当前位置: 代码迷 >> 综合 >> 解决python - /usr/bin/python3: Error while finding spec for 'virtualenvwrapper.hook_loader'
  详细解决方案

解决python - /usr/bin/python3: Error while finding spec for 'virtualenvwrapper.hook_loader'

热度:72   发布时间:2023-12-29 00:50:33.0

ECS服务器Ubuntu18安装python3后,打开命令行界面总会提示:
/usr/bin/python: Error while finding module specification for 'virtualenvwrapper.hook_loader' (ModuleNotFoundError: No module named 'virtualenvwrapper')
virtualenvwrapper.sh: There was a problem running the initialization hooks.

If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is
set properly.

有的文章说修改.bashrc中的VIRTUALENVWRAPPER_PYTHON,之后执行source  ~/.bashrc。这个方法对我本机没有起作用
之后查询:

http://www.itkeyword.com/doc/1445534594720488x414/usr-bin-python3-error-while-finding-spec-for-virtualenvwrapper-hook-loader

sudo pip3 install virtualenv virtualenvwrapper
source ~/.bashrc

然后就没有提示了
 

  相关解决方案