Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installation of pipenv on Windows fails

Tags:

python

pipenv

I am working on a website with Django Heroku template. I want to work on this website on my Windows computer, and one of the requirements to work with Heroku and Python is to have pipenv (the project has a Pipfile).

To install pipenv on Windows, I have tried two commands in the cmd terminal, which gave approximately the same error:

pip install pipenv

results in

Collecting pipenv
  Using cached pipenv-11.9.0.tar.gz
    Complete output from command python setup.py egg_info:
    error in pipenv setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected version spec in pathlib;python_version<"3.4" at ;python_version<"3.4"

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\myUserName\AppData\Local\Temp\pip-build-267yrlop\pipenv\

And:

easy_install -U pipenv

results in

Searching for pipenv
Reading https://pypi.python.org/simple/pipenv/
Best match: pipenv 11.9.0
Downloading https://pypi.python.org/packages/aa/43/e7426676c659fa3c1db28653ceee3571efbaaec2d2795bca00212989268a/pipenv-11.9.0.tar.gz#md5=0cdefd8434dc2b30415708d517730dcb
Processing pipenv-11.9.0.tar.gz
Writing C:\Users\myUserName\AppData\Local\Temp\easy_install-p2bvwljy\pipenv-11.9.0\setup.cfg
Running pipenv-11.9.0\setup.py -q bdist_egg --dist-dir C:\Users\myUserName\AppData\Local\Temp\easy_install-p2bvwljy\pipenv-11.9.0\egg-dist-tmp-vfore9pv
error: Setup script exited with error in pipenv setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected version spec in pathlib;python_version<"3.4" at ;python_version<"3.4"

I don't really understand the error message. It seems like an error in the setup script of pipenv but most likely isn't. Or is it expecting a Python version lower than 3.4? (if so, how do I install it with my Python 3.5?)

EDIT: I've tried with admin rights, in and out of a virtualenv, but same result.

like image 694
nyr1o Avatar asked Apr 09 '18 19:04

nyr1o


1 Answers

I think this has to do with an outdated version of either setuptools or pip. First try updating setuptools with

pip install --upgrade setuptools

and then installing pipenv with

pip install pipenv

If that still fails, try updating your version of pip with

pip install --upgrade pip

or (because you mentioned you were on Windows)

python -m pip install --upgrade pip
like image 70
wpercy Avatar answered Oct 02 '22 02:10

wpercy