Pipenv:找不到命令 [英] Pipenv: Command Not Found

查看:721
本文介绍了Pipenv:找不到命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Python开发的新手,正在尝试使用pipenv.我运行了命令pip install pipenv,该命令成功运行:

I'm new to Python development and attempting to use pipenv. I ran the command pip install pipenv, which ran successfully:

...
Successfully built pipenv pathlib shutilwhich pythonz-bd virtualenv-clone
Installing collected packages: virtualenv, pathlib, shutilwhich, backports.shutil-get-terminal-size, pythonz-bd, virtualenv-clone, pew, first, six, click, pip-tools, certifi, chardet, idna, urllib3, requests, pipenv
...

但是,当我在新的根项目目录中运行命令pipenv install时,会收到以下消息:-bash: pipenv: command not found.我怀疑我可能需要修改.bashrc,但不清楚要添加到文件中的内容还是不清楚是否需要修改.

However, when I run the command pipenv install in a fresh root project directory I receive the following message: -bash: pipenv: command not found. I suspect that I might need to modify my .bashrc, but I'm unclear about what to add to the file or if modification is even necessary.

推荐答案

发生这种情况是因为您没有在全局范围内安装它(系统范围内).为了使其在您的path中可用,您需要使用sudo进行安装,如下所示:

That happens because you are not installing it globally (system wide). For it to be available in your path you need to install it using sudo, like this:

$ sudo pip install pipenv

这篇关于Pipenv:找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆