This repository was archived by the owner on Dec 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
This repository was archived by the owner on Dec 5, 2022. It is now read-only.
VIRTUAL_ENV is not set #48
Copy link
Copy link
Open
Description
After upgrade python from 3.8 to 3.9 atom-python-virtualenv does not working.
When I run program under atom it can't find installed modules:
Traceback (most recent call last):
File "C:\Users\ilis\PyProj\hyperskill\test_venv.py", line 12, in <module>
from nltk.corpus import brown
ModuleNotFoundError: No module named 'nltk'
When I run it with PowerShell it's OK.
I rewritten my program to test a case:
import os
import sys
for e, v in os.environ.items():
if "hyper" in v:
print(e, v)
for path in sys.path:
print(path)
from nltk.corpus import brown
print(brown.categories())
and find out a difference:
atom output is:
PATH C:\Users\ilis\PyEnvs\hyperskill\Scripts;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PowerShell\7\;C:\Users\ilis\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\ilis\AppData\Local\Programs\Python\Python39\;C:\Users\ilis\AppData\Local\Programs\Python\Launcher\;C:\Users\ilis\AppData\Local\Microsoft\WindowsApps;C:\Users\ilis\AppData\Local\atom\bin;C:\Users\ilis\AppData\Local\Programs\Microsoft VS Code\bin;
C:\Users\ilis\PyProj\hyperskill
c:\users\ilis\appdata\local\programs\python\python39\python39.zip
c:\users\ilis\appdata\local\programs\python\python39\DLLs
c:\users\ilis\appdata\local\programs\python\python39\lib
c:\users\ilis\appdata\local\programs\python\python39
c:\users\ilis\appdata\local\programs\python\python39\lib\site-packages
Traceback (most recent call last):
File "C:\Users\ilis\PyProj\hyperskill\test_venv.py", line 12, in <module>
from nltk.corpus import brown
ModuleNotFoundError: No module named 'nltk'
and PowerShell output is:
(hyperskill) C:\Users\ilis\PyProj\hyperskill>py test_venv.py
ENV_PROMPT (hyperskill)
PATH C:\Users\ilis\PyEnvs\hyperskill\Scripts;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PowerShell\7\;C:\Users\ilis\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\ilis\AppData\Local\Programs\Python\Python39\;C:\Users\ilis\AppData\Local\Programs\Python\Launcher\;C:\Users\ilis\AppData\Local\Microsoft\WindowsApps;C:\Users\ilis\AppData\Local\atom\bin;C:\Users\ilis\AppData\Local\Programs\Microsoft VS Code\bin
PROMPT (hyperskill) $P$G
VIRTUAL_ENV C:\Users\ilis\PyEnvs\hyperskill
C:\Users\ilis\PyProj\hyperskill
c:\users\ilis\appdata\local\programs\python\python39\python39.zip
c:\users\ilis\appdata\local\programs\python\python39\DLLs
c:\users\ilis\appdata\local\programs\python\python39\lib
c:\users\ilis\appdata\local\programs\python\python39
C:\Users\ilis\PyEnvs\hyperskill
C:\Users\ilis\PyEnvs\hyperskill\lib\site-packages
C:\Users\ilis\PyProj\hyperskill
['adventure', 'belles_lettres', 'editorial', 'fiction', 'government', 'hobbies', 'humor', 'learned', 'lore', 'mystery', 'news', 'religion', 'reviews', 'romance', 'science_fiction']
Package changes only the PATH environment C:\Users\ilis\PyEnvs\hyperskill is a venv directory
But it doesn't set the VIRTUAL_ENV environment and python can't find module for import.
Please, help me to solve this problem.
Metadata
Metadata
Assignees
Labels
No labels