当前位置: 代码迷 >> 综合 >> 虚拟环境错误:启动bash 时候出现/usr/bin/python: No module named virtualenvwrapper
  详细解决方案

虚拟环境错误:启动bash 时候出现/usr/bin/python: No module named virtualenvwrapper

热度:51   发布时间:2023-11-21 05:31:16.0

虚拟环境错误:启动bash 时候出现/usr/bin/python: No module named virtualenvwrapper

背景

  1. 系统:Ubuntu 18
  2. 错误
/usr/bin/python: 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.

解决办法

  1. 原因

环境变量没有配置

  1. 解决
    在终端中加入环境变量配置
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
  相关解决方案