pipenv: Command "python setup.py egg_info" failed with error code 1 i

Pipenv install is trying to install a library on a different python version.

I set pipenv to python 3.4.2 version, however, when I run pip install I get the following error :

screen shot 2017-09-10 at 1 54 04 pm

And as you can see it’s trying to install a library on python2.7 (default python version). Steps:

pip install pipenv cd /path-project pipenv --three pipenv install

Got the error

pipenv --version

pipenv, version 6.2.1

Pipfile.lock

{
    "_meta": {
        "hash": {
            "sha256": "664809faca877e7d72716808d6be74ced6c98b258f95e418b5ee4a4b57762626"
        },
        "host-environment-markers": {
            "implementation_name": "cpython",
            "implementation_version": "3.4.2",
            "os_name": "posix",
            "platform_machine": "x86_64",
            "platform_python_implementation": "CPython",
            "platform_release": "16.7.0",
            "platform_system": "Darwin",
            "platform_version": "Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64",
            "python_full_version": "3.4.2",
            "python_version": "3.4",
            "sys_platform": "darwin"
        },
        "pipfile-spec": 3,
        "requires": {},
        "sources": [
            {
                "url": "https://pypi.python.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {
    ....

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 11
  • Comments: 32 (20 by maintainers)

Most upvoted comments

sounds like you’re having trouble installing a python module — not a pipenv problem 😉

Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-install-ZPv0av/cairocffi/

I am facing this issue please help.

@techalchemy how do we get better error logs from this? I’m passing --verbose and still just getting this pipenv.patched.notpip._internal.exceptions.InstallationError with no other output.

Nice! Replaced my old configuration with pipenv check.

macOS Sierra upgrading pyobjc-core also worked for me.

for me, on Mac OSX High Sierra, what fixed my issue with getting the error message: Command “python setup.py egg_info” failed with error code 1

sudo pip install pyobjc-core sudo pip install pyobjc

Also, safety is built into pipenv now! You can just run pipenv check and it’ll run safety for you 😃

None, other than running $ pipenv lock --verbose

we have significantly better error handling around this in an upcoming release

that said, you would need to provide additional detail to troubleshoot your actual problem which may or may not be resolved by that error handling.

Hi, this happened to me as well on package psycopg2. The requirements.txt contained a ref to pscopg2==2.6.2. I have version 2.7.2. When I updated the requirements.txt to ==2.7.2, pipenv install worked fine.

Yeah, i’m not sure there’s anything we can do about that. I’d raise the issue with pip-tools, see if they have any answers.