【发布时间】:2020-07-21 18:29:20
【问题描述】:
我使用pip install pipenv 安装了pipenv,没有问题。
PS D:\GitHub\newhome.ca> pip install pipenv
Requirement already satisfied: pipenv in c:\users\hustler\appdata\roaming\python\python37\site-packages (2020.6.2)
Requirement already satisfied: virtualenv in c:\users\hustler\appdata\roaming\python\python37\site-packages (from pipenv) (20.0.27)
Requirement already satisfied: certifi in c:\users\hustler\appdata\roaming\python\python37\site-packages (from pipenv) (2020.6.20)
Requirement already satisfied: virtualenv-clone>=0.2.5 in c:\users\hustler\appdata\roaming\python\python37\site-packages (from pipenv) (0.5.4)
Requirement already satisfied: pip>=18.0 in c:\program files\python37\lib\site-packages (from pipenv) (18.1)
Requirement already satisfied: setuptools>=36.2.1 in c:\program files\python37\lib\site-packages (from pipenv) (40.6.2)
Requirement already satisfied: importlib-metadata<2,>=0.12; python_version < "3.8" in c:\users\hustler\appdata\roaming\python\python37\site-packages (from virtualenv->pipenv) (1.7.0)
Requirement already satisfied: six<2,>=1.9.0 in c:\users\hustler\appdata\roaming\python\python37\site-packages (from virtualenv->pipenv) (1.15.0)
Requirement already satisfied: distlib<1,>=0.3.1 in c:\users\hustler\appdata\roaming\python\python37\site-packages (from virtualenv->pipenv) (0.3.1)
Requirement already satisfied: appdirs<2,>=1.4.3 in c:\users\hustler\appdata\roaming\python\python37\site-packages (from virtualenv->pipenv) (1.4.4)
Requirement already satisfied: filelock<4,>=3.0.0 in c:\users\hustler\appdata\roaming\python\python37\site-packages (from virtualenv->pipenv) (3.0.12)
Requirement already satisfied: zipp>=0.5 in c:\users\hustler\appdata\roaming\python\python37\site-packages (from importlib-metadata<2,>=0.12; python_version < "3.8"->virtualenv->pipenv) (3.1.0)
You are using pip version 18.1, however version 20.2b1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
正如你在上面看到的,但是当我运行 pipenv --version 时,我得到了这个错误:
PS D:\GitHub\newhome.ca> pipenv --version
pipenv : The term 'pipenv' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was included,
verify that the path is correct and try again.
At line:1 char:1
+ pipenv --version
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (pipenv:String) [], CommandNotFoundExcepti
on
+ FullyQualifiedErrorId : CommandNotFoundException
我还在环境变量的路径中添加了pipenv的路径,即c:\users\hustler\appdata\roaming\python\python37\site-packages\pipenv,但仍然出现此错误。
【问题讨论】:
-
不需要pipenv的路径,只需要..\PythonXX\Scripts\
-
我认为它可能会有所帮助,因为之前有一条消息指出您应该将它添加到您的路径中,所以我做到了。我卸载然后重新安装。没有什么能正常工作
-
已经安装好了,修复脚本路径后检查
pipenv --version了吗? -
它已经安装了,但我做了一切它不起作用
-
那么路径正确吗?转到脚本位置,看看你是否找到文件
pipenv.py,如果在那里,则复制确切的路径并将其添加到环境路径变量中,记得删除旧的,或者你可以编辑旧的,在路径你应该有一个用于 Python,另一个用于脚本,它应该看起来像这样 `c:\users\hustler\appdata\roaming\python\python37\Scripts\`
标签: python virtualenv pipenv