(Nov-30-2019, 11:18 AM)sam2016 Wrote: This way can not be working.
Okay i don't Tribon,if it need in Path then add it,but do not add Python 3.8 to Path.
There should is no problem to use 3.8 even if not in Path,i do not have 3.8 in Path now but 3.7.
Can access from everywhere trough
py
.
# Check python
E:\div_code
λ py -3.8 -V
Python 3.8.0
# Check pip
E:\div_code
λ py -3.8 -m pip -V
pip 19.2.3 from C:\Python38\lib\site-packages\pip (python 3.8)
# Start IDLE
E:\div_code
λ py -3.8 -m idlelib
There is nothing magic about
Environment Variables Path
,
when eg Python 3.8 is not there it still work fine trough direct access in folder or as i showed with
py
# In folder
C:\Python38
λ python
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
C:\Python38
λ cd ..
# Everywhere else 3.7 as that what the main version i have in Environment Variables Path
C:\
λ 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.
>>> exit()
Quote:Is there any way that installing python3.8 in virtual environment?
You can make virtual environment with 3.8,not install into it.
What i post over should explain we you can use 3.8 even if not in Path.
Here quick demo making a virtual environment,i be using 3.8 here.
# Make environment
E:\div_code
λ py -3.8 -m venv my_env
# Cd in
E:\div_code
λ cd my_env
# Activate
E:\div_code\my_env
λ E:\div_code\my_env\Scripts\activate
# Test Python
(my_env) E:\div_code\my_env
λ python -V
Python 3.8.0
# Test pip
(my_env) E:\div_code\my_env
λ pip -V
pip 19.2.3 from e:\div_code\my_env\lib\site-packages\pip (python 3.8)
# Executable placement
(my_env) E:\div_code\my_env
λ python -c "import sys; print(sys.executable)"
E:\div_code\my_env\Scripts\python.exe