Aug-08-2019, 05:52 PM
Follow this first(install Python 3.7) so
Virtual environment in build into Python(no install) trough venv.
Here is run:
Eg a good Editor is VS Code from start.
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.