WSL ã® Python 㧠venv ã«ããä»®æ³ç°å¢ã®ä½æãã¨ã©ã¼ã«ãªã
ä»®æ³ç°å¢ã®ä½æã«å¤±æ
WSL ã® Python ã§ä»®æ³ç°å¢ãä½ããã¨ããã以ä¸ã®ã¨ã©ã¼ãåºã¾ããã
$ python3 -m venv .venv The virtual environment was not created successfully because ensurepip is not available. On Debian/Ubuntu systems, you need to install the python3-venv package using the following command. apt-get install python3-venv You may need to use sudo with that command. After installing the python3-venv package, recreate your virtual environment. Failing command: ['/path/to/project/.venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']
ã¨ã©ã¼ã¡ãã»ã¼ã¸ã«ããã¨ï¼ä»®æ³ç°å¢ãä½ãããã«ã¯ python3-venv
ãã¤ã³ã¹ãã¼ã«ããå¿
è¦ãããã¨ã®ãã¨ã§ãã
ã¡ãã»ã¼ã¸ã®æ示ã«å¾ãï¼ä¸è¨ã®ã³ãã³ããå®è¡ãã¦ã¤ã³ã¹ãã¼ã«ããã¨ããï¼ç¡äºã«ä»®æ³ç°å¢ãä½ããããã«ãªãã¾ããã
$ sudo apt install python3-venv
ensurepip ãç¡å¹åããã¦ãã
ã¨ã©ã¼ã¡ãã»ã¼ã¸ã«ããéãï¼ãã®ã¨ã©ã¼ã¯ Ubuntu 㧠ensurepip
ãç¡å¹åããã¦ããããã«èµ·ãã£ã¦ããããã§ãã
ã°ãã¼ãã«ç°å¢ã« pip
ãå
¥ã£ã¦ããã¨æå³ããã·ã¹ãã ãå£ãã¦ãã¾ãå¯è½æ§ãããããï¼Debian ã Ubuntu ã§ã¯ ensurepip
ãç¡å¹åããã¦ããã¨ã®ãã¨ã§ãã
$ python3 -m ensurepip ensurepip is disabled in Debian/Ubuntu for the system python. Python modules for the system python are usually handled by dpkg and apt-get. apt-get install python-<module name> Install the python-pip package to use pip itself. Using pip together with the system python might have unexpected results for any system installed module, so use it on your own risk, or make sure to only use it in virtual environments.
python3-venv
ãã¤ã³ã¹ãã¼ã«ãããã¨ã§ä»®æ³ç°å¢å
ã§ã¯ pip
ã使ããããã«ãªã£ãã®ã§ããï¼ã°ãã¼ãã«ç°å¢ã§ã¯ pip
ã¯ä½¿ããªãã¾ã¾ã§ãã
(.venv) $ pip3 --version pip 8.1.1 from /path/to/project/.venv/lib/python3.5/site-packages (python 3.5) $ pip3 --version The program 'pip3' is currently not installed. You can install it by typing: sudo apt install python3-pip
ã°ãã¼ãã«ç°å¢ã§ pip
ã使ãããå ´åã¯ï¼python3-pip
ãã¤ã³ã¹ãã¼ã«ããã°ããããã§ãã
以ä¸ã®ã³ãã³ããå®è¡ãã㨠pip3
ã使ããããã«ãªãã¾ããã
$ sudo apt install python3-pip