Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
653 views
in Technique[技术] by (71.8m points)

python - pipenv is not recognized on powershell

I made sure pipenv was installed in the following path C:UsersOwner> pip install pipenv

Then got the following response:

Requirement already satisfied: setuptools>=36.2.1 in c:usersownerappdatalocalprogramspythonpython36-32lib
ackages (from pipenv) (39.0.1)
Requirement already satisfied: pip>=9.0.1 in c:usersownerappdatalocalprogramspythonpython36-32libsite-pac
(from pipenv) (20.1)
Requirement already satisfied: virtualenv-clone>=0.2.5 in c:usersownerappdata
oamingpythonpython36site-pack
from pipenv) (0.5.4)
Requirement already satisfied: virtualenv in c:usersownerappdata
oamingpythonpython36site-packages (from pi
(16.0.0)
Requirement already satisfied: certifi in c:usersownerappdata
oamingpythonpython36site-packages (from pipen
20.4.5.1)

After that, I tried to set it up in a specific directory. And, then I got the following message.

PS C:UsersOwnerdesktopPythonPyprojects> pipenv install
The term 'pipenv' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
ling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:7
+ pipenv <<<<  install
    + CategoryInfo          : ObjectNotFound: (pipenv:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Before, it kept saying that I didn't have the wheel set up. So, I installed that. But, now I get the above mentioned error messages. How can I resolve this? Thanks for your help.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Seems you don't have pipenv in your PATH environment variable.

You should check for your python install location e.g. I have it installed at C:UsersuserNameAppDataLocalProgramsPythonPython38-32

Include "python_install_locationScripts" in your PATH environment variable. e.g.

C:UsersuserNameAppDataLocalProgramsPythonPython38-32Scripts

To set your environment variable:

  1. Open Control PanelSystem and SecuritySystem from your file explorer.
  2. Advanced System Settings
  3. Environment Variables...
  4. Select Path and Edit
  5. Add a new row to include above path.

Scripts folder must have an entry like

pipenv script

To verify run pipenv --version

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...