【问题标题】:Unable to install Django with pipenv even though pipenv appears to be installed即使似乎已安装 pipenv,也无法使用 pipenv 安装 Django
【发布时间】:2020-05-21 16:15:26
【问题描述】:

我正在使用 Python 3.8.1:

$ python -V
Python 3.8.1

我已经安装了 pipenv:

$ pip list | grep pipenv
pipenv                         2018.11.26

如果我尝试安装 Django,我会收到以下错误:

$ pipenv install django
pyenv: pipenv: command not found

The `pipenv' command exists in these Python versions:
  3.7.2

我是否做错了什么导致 pipenv 无法与 3.8.1 一起使用,我该如何解决?

【问题讨论】:

    标签: python python-3.x bash pip pipenv


    【解决方案1】:

    我不是 pipenv 用户,但您的 pipenv 似乎已经在您的系统上安装了 python 3.7.2,而不是默认的 python 3.8.1。

    这可能是因为您在 env 中的 pip 实际上是针对您系统上的 python 3.7.2 的。

    一种可能的解决方案:

    1. 卸载使用 python 3.7.2 安装的 pipenv
       pip uninstall pipenv
    
    1. 使用 python 3.8.1 安装 pipenv
       python -m pip install pipenv
    
    1. 用 pipenv 安装 Django
       python -m pipenv install django
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-12-15
      • 1970-01-01
      • 2012-10-24
      • 1970-01-01
      • 2018-12-15
      • 2021-02-12
      • 2019-10-30
      • 1970-01-01
      相关资源
      最近更新 更多