hie*_*ppe 7 software-center virtualenv virtualenvwrapper
因为我没有在这个时候使用他们,我试图卸载virtualenv
并virtualenvwrapper
通过Ubuntu软件中心。现在,每当我打开控制台时,都会收到以下错误消息:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named virtualenvwrapper.hook_loader
virtualenvwrapper.sh: There was a problem running the initialization hooks. If Python could not import the module virtualenvwrapper.hook_loader, check that virtualenv has been installed for VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is set properly.
Run Code Online (Sandbox Code Playgroud)
此外,该目录~/.virtualenvs/
仍然存在。
我怎样才能让我的系统恢复到安装virtualenv
和之前的干净和功能状态virtualenvwrapper
?
更新
按照建议,我检查了以下文件中virtualenv
每个文件的出现是否有负面结果:
~/.bashrc
~/.profile
/etc/profile
/etc/profile.d/*
/etc/environment
Run Code Online (Sandbox Code Playgroud)
我遇到了同样的问题,但最终发现了有问题的文件在哪里。它是
/etc/bash_completion.d/virtualenvwrapper
删除它,您将不会再次看到错误消息。
PS:这是我如何找到文件的位置:
grep -lir "virtualenvwrapper" /etc/