[英]Installed Python package is causing conflict for VirtualEnv but can't find and remove it
I was attempting to install some google
modules ( cloud
and oauth2
), was apparently successful in some and not others. 我正在尝试安装一些
google
模块( cloud
和oauth2
),显然在某些模块中成功了。 Then the Virtualenv I installed them to stop working. 然后我安装了Virtualenv,使其停止工作。 When I try to run an iPython notebook the kernel keeps dying.
当我尝试运行iPython笔记本时,内核会不断消失。 Based on some research, it seems to be due to a conflict from what I installed, but now I can't even find the thing to remove it.
根据一些研究,这似乎是由于与我安装的软件存在冲突,但是现在我什至找不到要删除它的东西。 Even a
pip freeze
or pip list
command won't work, showing the same error, posted below. 甚至
pip freeze
或pip list
命令也将不起作用,显示相同的错误,如下所示。 Anybody know where I can go to find the google
module mentioned in the error so I can get rid of it and go back to how it was before? 有人知道我可以去哪里找到错误中提到的
google
模块,以便我摆脱它并回到以前的状态吗?
Traceback (most recent call last):
File "/Users/my_user_name/.virtualenvs/my_virtualenv/lib/python2.7/site.py", line 703, in <module>
main()
File "/Users/my_user_name/.virtualenvs/my_virtualenv/lib/python2.7/site.py", line 683, in main
paths_in_sys = addsitepackages(paths_in_sys)
File "/Users/my_user_name/.virtualenvs/my_virtualenv/lib/python2.7/site.py", line 282, in addsitepackages
addsitedir(sitedir, known_paths)
File "/Users/my_user_name/.virtualenvs/my_virtualenv/lib/python2.7/site.py", line 204, in addsitedir
addpackage(sitedir, name, known_paths)
File "/Users/my_user_name/.virtualenvs/my_virtualenv/lib/python2.7/site.py", line 173, in addpackage
exec(line)
File "<string>", line 1, in <module>
KeyError: 'google'
This is the same error that repeatedly shows when I try to run an iPython notebook with that kernel. 这是我尝试使用该内核运行iPython Notebook时反复显示的错误。 The problems don't exist outside of this virtualenv.
该问题不在此virtualenv之外。
site.addpackage()
reads and interprets *.pth
files from site-packages
directory. site.addpackage()
从site-packages
目录读取并解释*.pth
文件。 Check all files for something unusual. 检查所有文件是否有异常。
Or simply destroy and recreate the failing virtual envs. 或者干脆销毁并重新创建失败的虚拟环境。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.