Reputation: 1
I'm trying to create a virtual environment. For this, I install pipenv from the terminal:
>pip install pipenv
No problem.
And then, when trying to install a package, or do about anything from pipenv, I can't do it.
>pipenv install requests
Error:
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 install requests
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (pipenv:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Please, help me! I've tried with older versions of the pipenv package and I can't figure out what's going on.
Upvotes: 0
Views: 559
Reputation: 11237
Use python -m pip install requests
This is happening because of the different version of python stored in your system, and pip associated with that version is different.
for example: in your system default python can be 2.7 and the python 3 versions can be 3.6. which invoke by running python
and python3
respectively in terminal.
Now if you use pip
(pip install requests
) then it will install the requests in python2.7 ie the default one with which pip is associated.
not to install with python3.6 you need to call pip associated with it by pip3 install requests
.
so this will create confusion. So it is good practice if you call the pip by using python invoke-command ie python -m pip install <package name>
so this will install the package in the python environment where you are working or want to work.
Upvotes: 1