Closed RaistlinTAO closed 1 year ago
Simply removing the os.path.realpath(os.path.join(os.environ["PREFIX"], "lib")),
line solved the problem for me
Simply removing the
os.path.realpath(os.path.join(os.environ["PREFIX"], "lib")),
line solved the problem for me
Best-practice-wise, I d like to stay away from touching the source code of dependencies, since we have other members working on this.
Same with you, have you deal with this problem?
import graphvite Traceback (most recent call last): File "
", line 1, in File "/home/lyj/anaconda3/envs/graphvite3/lib/python3.8/site-packages/graphvite/init.py", line 30, in os.path.realpath(os.path.join(os.environ["PREFIX"], "lib")), File "/home/lyj/anaconda3/envs/graphvite3/lib/python3.8/os.py", line 675, in getitem raise KeyError(key) from None KeyError: 'PREFIX'
Bevor I imported graphvite I used
os.environ["CONDA_PREFIX"] = sys.base_prefix
os.environ["PREFIX"]= sys.base_prefix
Did you know the solution for this problem?
Did you know the solution for this problem?
Define os.environ["PREFIX"] by yourself should fix this.
The program just stop with 'raise KeyError(key) from None' error right after 'import graphvite as gv', with no other code.
Environment
Python: 3.8 Conda: Latest CentOS
Error Message