【问题标题】:virtualenvwrapper Command '' not found, but can be installed withvirtualenvwrapper 命令''未找到,但可以安装
【发布时间】:2020-11-04 17:29:42
【问题描述】:

我在 Ubuntu WSL 上并使用 sudo apt install 安装了 virtualenvwrapper

根据需要,变量 WORKON_HOME 已正确设置为我的虚拟 envs 目录。

当我运行 mkvirtualenv myawesomeproject 时,我收到以下错误:

created virtual environment CPython3.8.2.final.0-64 in 760ms
  creator CPython3Posix(dest=/home/fred/venvs/myawesomeproject, clear=False, global=False)
  seeder FromAppData(download=False, CacheControl=latest, appdirs=latest, certifi=latest, chardet=latest, colorama=latest, contextlib2=latest, distlib=latest, distro=latest, html5lib=latest, idna=latest, ipaddr=latest, lockfile=latest, msgpack=latest, packaging=latest, pep517=latest, pip=latest, pkg_resources=latest, progress=latest, pyparsing=latest, pytoml=latest, requests=latest, retrying=latest, setuptools=latest, six=latest, urllib3=latest, webencodings=latest, wheel=latest, via=copy, app_data_dir=/home/fred/.local/share/virtualenv/seed-app-data/v1.0.1.debian)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator

Command '' not found, but can be installed with:

sudo apt install mailutils-mh  # version 1:3.7-2.1, or
sudo apt install meshio-tools  # version 4.0.4-1
sudo apt install mmh           # version 0.4-2
sudo apt install nmh           # version 1.7.1-6
sudo apt install termtris      # version 1.3-1

有什么想法吗?

【问题讨论】:

    标签: windows-subsystem-for-linux virtualenvwrapper ubuntu-20.04


    【解决方案1】:

    在你的 .bashrc 文件中添加这两行

    export VIRTUALENVWRAPPER_PYTHON='/usr/bin/python3'
    source /usr/local/bin/virtualenvwrapper.sh
    

    请确保将它们完全按此顺序排列。

    第一行表示 virtualenvwrapper 将使用 python 3。 您必须将 '/usr/bin/python3' 替换为您的 python 路径。你可以通过输入which python找到它

    【讨论】:

      猜你喜欢
      • 2021-10-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-31
      • 2015-07-09
      • 1970-01-01
      • 2012-07-18
      相关资源
      最近更新 更多