Installing PIP and setting up virtualenv - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Installing PIP and setting up virtualenv (/thread-20392.html) |
Installing PIP and setting up virtualenv - steveholland68 - Aug-08-2019 Please see error codes below C:\cicdbuzz>dir Volume in drive C is OS Volume Serial Number is 6465-B18E Directory of C:\cicdbuzz 07/08/2019 20:15 <DIR> . 07/08/2019 20:15 <DIR> .. 06/08/2019 08:18 <DIR> buzz 06/08/2019 07:38 507 OS © - Shortcut.lnk 07/08/2019 20:13 1,414,720 pip-19.2.1-py2.py3-none-any.whl 06/08/2019 14:33 <DIR> virtualenv-16.7.2 2 File(s) 1,415,227 bytes 4 Dir(s) 918,918,098,944 bytes free C:\cicdbuzz>python get-pip.py 'python' is not recognized as an internal or external command, operable program or batch file. C:\cicdbuzz>python get-pip-19.2.1-py2.py3-none-any.whl 'python' is not recognized as an internal or external command, operable program or batch file. C:\cicdbuzz>get-pip-19.2.1-py2.py3-none-any.whl 'get-pip-19.2.1-py2.py3-none-any.whl' is not recognized as an internal or external command, operable program or batch file. C:\cicdbuzz>get pip-19.2.1-py2.py3-none-any.whl 'get' is not recognized as an internal or external command, operable program or batch file. C:\cicdbuzz>get-pip.py 'get-pip.py' is not recognized as an internal or external command, operable program or batch file. C:\cicdbuzz>pip-v 'pip-v' is not recognized as an internal or external command, operable program or batch file. Also get these errors – user366006 50 mins ago C:\cicdbuzz>get-pip.py 'get-pip.py' is not recognized as an internal or external command, operable program or batch file. C:\cicdbuzz>pip-v 'pip-v' is not recognized as an internal or external command, operable program or batch file. – user366006 50 mins ago C:\cicdbuzz>virtualenv venv 'virtualenv' is not recognized as an internal or external command, operable program or batch file. C:\cicdbuzz>dir Volume in drive C is OS Volume Serial Number is 6465-B18E Directory of C:\cicdbuzz 06/08/2019 14:35 <DIR> . 06/08/2019 14:35 <DIR> .. 06/08/2019 08:18 <DIR> buzz 06/08/2019 07:38 507 OS © - Shortcut.lnk 06/08/2019 14:33 <DIR> virtualenv-16.7.2 1 File(s) 507 bytes 4 Dir(s) 919,497,621,504 bytes free C:\cicdbuzz>source venv/bin/activate 'source' is not recognized as an internal or external command, operable program or batch file. RE: Installing PIP and setting up virtualenv - snippsat - Aug-08-2019 Follow this first(install Python 3.7) so pip and python work from command line(cmd), Python 3.6/3.7 and pip installation under WindowsVirtual environment in build into Python(no install) trough venv. Here is run: # Test python C:\>python -c "import sys; print(sys.executable)" C:\python37\python.exe # Test pip C:\>pip -V pip 19.0.3 from c:\python37\lib\site-packages\pip (python 3.7) # Make virtual environment C:\1>python -m venv test_env # Cd in C:\1>cd test_env # Activate environment C:\1\test_env>C:\1\test_env\Scripts\activate # Test python again,see now that it point to environment folder (test_env) C:\1\test_env>python -c "import sys; print(sys.executable)" C:\1\test_env\Scripts\python.exe # Test pip,see that it point to environment folder (test_env) C:\1\test_env>pip -V pip 19.0.3 from c:\1\test_env\lib\site-packages\pip (python 3.7) # Will now only install to environment (test_env) C:\1\test_env>pip install requests Collecting requests ...... Installing collected packages: urllib3, certifi, chardet, idna, requests Successfully installed certifi-2019.3.9 chardet-3.0.4 idna-2.8 requests-2.21.0 urllib3-1.24.2 # Test that it work (test_env) C:\1\test_env>python Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import requests >>> exit() (test_env) C:\1\test_env>If using virtual environment for Editor/IDE setup to use python.exe in environment.Eg a good Editor is VS Code from start. |