I installed pipenv by following the instructions here. From the Windows command prompt I ran
pip install --user pipenv
which returned the mess
I have a similar setup and faced a similar problem, but the solution I found was fairly simple. All of my PATH variables were already correct (from Python 3 the Windows Installer automatically does all of this).
The problem actually arises because of conflicting installations of virtualenv.
To address this problem you need to simply run the following commands:
First, remove your current version of virtualenv: pip uninstall virtualenv
Then, remove your current version of pipenv: pip uninstall pipenv
When you are asked Proceed (y/n)?
just enter y
. This will give you a clean slate.
Finally, you can once again install pipenv and its dependencies: pip install pipenv
This will also install the latest version of virtualenv.
Just enter pipenv --version
in the command prompt and you should see the desired output.
I know this sounds the mundane, but it is actually the solution for Windows systems. You do not need to modify any of your system environment variables (please do not add site-packages to your environment variables).
Hope this helps!
use this cmd solve my problem :
python -m pipenv install django==2.1
Please check that pipenv is installed in your system by run following command in command promt:
pipenv --version
If it returns error, so please install again and set environment variable path in your system
python -m pipenv
may work for you, this is telling python to run the module pipenv
instead of the terminal shortcut which sometimes doesn't install properly.
Just to show they are equivalent when I installed pipenv
and run which pipenv
it points to a file like /Library/Frameworks/Python.framework/Versions/3.6/bin/pipenv
which looks like this:
#!/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6
# -*- coding: utf-8 -*-
import re
import sys
from pipenv import cli
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(cli())
so it removes .pyw
or .exe
from the executable name then call pipenv.cli.cli()
. It is likely there is a file like this on your machine it just didn't add python's /bin
folder to your system PATH
so it isn't accessible, there is usually a warning when installing python if this happens but no one checks those. :P
the module pipenv.__main__
which is run when using python -m pipenv
looks like this:
from .cli import cli
if __name__ == '__main__':
cli()
Which calls pipenv.cli.cli()
. So this main module absolutely does the same effective thing.
to solve this problem i need to start my CMD as administrator.
pip uninstall pipenv
pip install pipenv
To test this new configuration, you can write pipenv --version
Instead of
C:\Users\Robert\AppData\Roaming\Python\Python35\site-packages
it should be
C:\Users\Robert\AppData\Roaming\Python\Python36\Scripts
after that, try closing and reopening the terminal