New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command "python setup.py egg_info" failed with error code 1 i #515

Closed
ignacio-chiazzo opened this Issue Sep 10, 2017 · 30 comments

Comments

Projects
None yet
@ignacio-chiazzo

ignacio-chiazzo commented Sep 10, 2017

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": {
    ....

@ignacio-chiazzo ignacio-chiazzo changed the title from Command "python setup.py egg_info" to Command "python setup.py egg_info" failed with error code 1 i Sep 10, 2017

@kennethreitz

This comment has been minimized.

Show comment
Hide comment
@kennethreitz

kennethreitz Sep 11, 2017

Contributor

Did you install pipenv with Python 2.7? It's using that pip to resolve the dependencies.

Contributor

kennethreitz commented Sep 11, 2017

Did you install pipenv with Python 2.7? It's using that pip to resolve the dependencies.

@tryer3000

This comment has been minimized.

Show comment
Hide comment
@tryer3000

tryer3000 Sep 14, 2017

pip version:
pip 9.0.1 from /home/joshua/.local/lib/python3.5/site-packages (python 3.5)
python version:
Python 3.5.2

I was using pipenv to setup an python2 venv when got this error

  File "/home/joshua/.local/lib/python3.5/site-packages/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/tmp9b9z51_sbuild/scapy/

tryer3000 commented Sep 14, 2017

pip version:
pip 9.0.1 from /home/joshua/.local/lib/python3.5/site-packages (python 3.5)
python version:
Python 3.5.2

I was using pipenv to setup an python2 venv when got this error

  File "/home/joshua/.local/lib/python3.5/site-packages/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/tmp9b9z51_sbuild/scapy/
@kennethreitz

This comment has been minimized.

Show comment
Hide comment
@kennethreitz

kennethreitz Sep 14, 2017

Contributor

sounds like you're having trouble installing a python module — not a pipenv problem ;)

Contributor

kennethreitz commented Sep 14, 2017

sounds like you're having trouble installing a python module — not a pipenv problem ;)

@sobolevn

This comment has been minimized.

Show comment
Hide comment
@sobolevn

sobolevn Sep 20, 2017

Contributor

I am also suffering this issue. But it is hard to recreate it. It just happens sometimes.

I have no problems with exact same packages with pip, and as I can see they are installed. It is breaking on 'Locking dev-dependencies':

Adding pre-commit==1.1.2 to Pipfile's [dev-packages]…
Locking [dev-packages] dependencies…
Traceback (most recent call last):
  File "/usr/local/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/cli.py", line 1532, in install
    do_lock(system=system)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/cli.py", line 907, in do_lock
    project=project
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/utils.py", line 217, in resolve_deps
    resolved_tree = resolver.resolve()
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/resolver.py", line 107, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/resolver.py", line 195, in _resolve_one_round
    for dep in self._iter_dependencies(best_match):
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/resolver.py", line 274, in _iter_dependencies
    dependencies = self.repository.get_dependencies(ireq)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/repositories/pypi.py", line 145, in get_dependencies
    self._dependencies_cache[ireq] = reqset._prepare_file(self.finder, ireq)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 634, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 129, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/req/req_install.py", line 439, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /var/folders/qn/2gssw9hx48g81chw0398hlrr0000gn/T/tmpf93If1build/ipython/
Contributor

sobolevn commented Sep 20, 2017

I am also suffering this issue. But it is hard to recreate it. It just happens sometimes.

I have no problems with exact same packages with pip, and as I can see they are installed. It is breaking on 'Locking dev-dependencies':

Adding pre-commit==1.1.2 to Pipfile's [dev-packages]…
Locking [dev-packages] dependencies…
Traceback (most recent call last):
  File "/usr/local/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/cli.py", line 1532, in install
    do_lock(system=system)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/cli.py", line 907, in do_lock
    project=project
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/utils.py", line 217, in resolve_deps
    resolved_tree = resolver.resolve()
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/resolver.py", line 107, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/resolver.py", line 195, in _resolve_one_round
    for dep in self._iter_dependencies(best_match):
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/resolver.py", line 274, in _iter_dependencies
    dependencies = self.repository.get_dependencies(ireq)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/repositories/pypi.py", line 145, in get_dependencies
    self._dependencies_cache[ireq] = reqset._prepare_file(self.finder, ireq)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 634, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 129, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/req/req_install.py", line 439, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /var/folders/qn/2gssw9hx48g81chw0398hlrr0000gn/T/tmpf93If1build/ipython/
@kennethreitz

This comment has been minimized.

Show comment
Hide comment
@kennethreitz

kennethreitz Sep 20, 2017

Contributor

@sobolevn please share your Pipfile.

Contributor

kennethreitz commented Sep 20, 2017

@sobolevn please share your Pipfile.

@kennethreitz

This comment has been minimized.

Show comment
Hide comment
@kennethreitz

kennethreitz Sep 20, 2017

Contributor

I've seen this behavior too — seems to be non-deterministic, and highly-dependent on the python environment.

Contributor

kennethreitz commented Sep 20, 2017

I've seen this behavior too — seems to be non-deterministic, and highly-dependent on the python environment.

@kennethreitz kennethreitz reopened this Sep 20, 2017

@sobolevn

This comment has been minimized.

Show comment
Hide comment
@sobolevn

sobolevn Sep 20, 2017

Contributor
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true

[dev-packages]

flake8-builtins = "==0.2"
flake8-commas = "==0.4.3"
flake8-quotes = "==0.9.0"
pytest = "==3.0.7"
pytest-flake8 = "==0.8.1"
pytest-isort = "==0.1.0"
ipython = "*"
gitlint = "*"
flake8-blind-except = "*"
pytest-django = "*"
pytest-xdist = "*"
safety = "*"
django-debug-toolbar = "*"
pre-commit = "==1.1.2"

[packages]

django = ">=1.11,<1.12"
django-split-settings = "*"
psycopg2 = "*"
django-axes = "*"

Link: https://github.com/wemake-services/wemake-django-template/blob/master/%7B%7B%20cookiecutter.project_name%20%7D%7D/Pipfile

Contributor

sobolevn commented Sep 20, 2017

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true

[dev-packages]

flake8-builtins = "==0.2"
flake8-commas = "==0.4.3"
flake8-quotes = "==0.9.0"
pytest = "==3.0.7"
pytest-flake8 = "==0.8.1"
pytest-isort = "==0.1.0"
ipython = "*"
gitlint = "*"
flake8-blind-except = "*"
pytest-django = "*"
pytest-xdist = "*"
safety = "*"
django-debug-toolbar = "*"
pre-commit = "==1.1.2"

[packages]

django = ">=1.11,<1.12"
django-split-settings = "*"
psycopg2 = "*"
django-axes = "*"

Link: https://github.com/wemake-services/wemake-django-template/blob/master/%7B%7B%20cookiecutter.project_name%20%7D%7D/Pipfile

@sobolevn

This comment has been minimized.

Show comment
Hide comment
@sobolevn

sobolevn Sep 20, 2017

Contributor

After removing ipython from Pipfile everything worked well.

Contributor

sobolevn commented Sep 20, 2017

After removing ipython from Pipfile everything worked well.

@kennethreitz

This comment has been minimized.

Show comment
Hide comment
@kennethreitz

kennethreitz Sep 20, 2017

Contributor

@sobolevn interesting. I locked that pipfile 5 times locally and everything worked fine.

Contributor

kennethreitz commented Sep 20, 2017

@sobolevn interesting. I locked that pipfile 5 times locally and everything worked fine.

@sobolevn

This comment has been minimized.

Show comment
Hide comment
@sobolevn

sobolevn Sep 20, 2017

Contributor

What data can I provide to help you with troubleshooting?

Contributor

sobolevn commented Sep 20, 2017

What data can I provide to help you with troubleshooting?

@kennethreitz

This comment has been minimized.

Show comment
Hide comment
@kennethreitz

kennethreitz Sep 20, 2017

Contributor

None, other than running $ pipenv lock --verbose

Contributor

kennethreitz commented Sep 20, 2017

None, other than running $ pipenv lock --verbose

@kennethreitz

This comment has been minimized.

Show comment
Hide comment
@kennethreitz

kennethreitz Sep 20, 2017

Contributor

Sounds like one of the packages has a wonky setup.py file — nothing we can do about that. If you think it's ipython, that wouldn't surprise me one bit.

Contributor

kennethreitz commented Sep 20, 2017

Sounds like one of the packages has a wonky setup.py file — nothing we can do about that. If you think it's ipython, that wouldn't surprise me one bit.

@sobolevn

This comment has been minimized.

Show comment
Hide comment
@sobolevn

sobolevn Sep 20, 2017

Contributor
» pipenv lock --verbose
Locking [dev-packages] dependencies…

                          ROUND 1                           
Current constraints:
  django-debug-toolbar
  flake8-blind-except
  flake8-builtins==0.2
  flake8-commas==0.4.3
  flake8-quotes==0.9.0
  gitlint
  ipython
  pre-commit==1.1.2
  pytest==3.0.7
  pytest-django
  pytest-flake8==0.8.1
  pytest-isort==0.1.0
  pytest-xdist
  safety

Finding the best candidates:
  found candidate django-debug-toolbar==1.8 (constraint was <any>)
  found candidate flake8-blind-except==0.1.1 (constraint was <any>)
  found candidate flake8-builtins==0.2 (constraint was ==0.2)
  found candidate flake8-commas==0.4.3 (constraint was ==0.4.3)
  found candidate flake8-quotes==0.9.0 (constraint was ==0.9.0)
  found candidate gitlint==0.8.2 (constraint was <any>)
  found candidate ipython==6.2.0 (constraint was <any>)
  found candidate pre-commit==1.1.2 (constraint was ==1.1.2)
  found candidate pytest==3.0.7 (constraint was ==3.0.7)
  found candidate pytest-django==3.1.2 (constraint was <any>)
  found candidate pytest-flake8==0.8.1 (constraint was ==0.8.1)
  found candidate pytest-isort==0.1.0 (constraint was ==0.1.0)
  found candidate pytest-xdist==1.20.0 (constraint was <any>)
  found candidate safety==1.5.1 (constraint was <any>)

Finding secondary dependencies:
  pre-commit==1.1.2         requires aspy.yaml, cached-property, identify>=1.0.0, nodeenv>=0.11.1, pyyaml, six, virtualenv
  pytest-xdist==1.20.0      requires execnet>=1.1, pytest-forked, pytest>=3.0.0
  flake8-commas==0.4.3      requires flake8<4.0.0,>=2
  gitlint==0.8.2            requires arrow==0.10.0, Click==6.6, ordereddict==1.1, sh==1.11; sys_platform != "win32"
  flake8-blind-except==0.1.1 requires setuptools
  pytest==3.0.7             requires py>=1.4.29, setuptools
  flake8-quotes==0.9.0      requires flake8
  ipython==6.2.0 not in cache, need to check index
Traceback (most recent call last):
  File "/usr/local/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/cli.py", line 1649, in lock
    do_lock(verbose=verbose, clear=clear)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/cli.py", line 907, in do_lock
    project=project
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/utils.py", line 217, in resolve_deps
    resolved_tree = resolver.resolve()
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/resolver.py", line 107, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/resolver.py", line 195, in _resolve_one_round
    for dep in self._iter_dependencies(best_match):
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/resolver.py", line 274, in _iter_dependencies
    dependencies = self.repository.get_dependencies(ireq)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/repositories/pypi.py", line 145, in get_dependencies
    self._dependencies_cache[ireq] = reqset._prepare_file(self.finder, ireq)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 634, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 129, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/req/req_install.py", line 439, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /var/folders/qn/2gssw9hx48g81chw0398hlrr0000gn/T/tmpy2igTrbuild/ipython/
Contributor

sobolevn commented Sep 20, 2017

» pipenv lock --verbose
Locking [dev-packages] dependencies…

                          ROUND 1                           
Current constraints:
  django-debug-toolbar
  flake8-blind-except
  flake8-builtins==0.2
  flake8-commas==0.4.3
  flake8-quotes==0.9.0
  gitlint
  ipython
  pre-commit==1.1.2
  pytest==3.0.7
  pytest-django
  pytest-flake8==0.8.1
  pytest-isort==0.1.0
  pytest-xdist
  safety

Finding the best candidates:
  found candidate django-debug-toolbar==1.8 (constraint was <any>)
  found candidate flake8-blind-except==0.1.1 (constraint was <any>)
  found candidate flake8-builtins==0.2 (constraint was ==0.2)
  found candidate flake8-commas==0.4.3 (constraint was ==0.4.3)
  found candidate flake8-quotes==0.9.0 (constraint was ==0.9.0)
  found candidate gitlint==0.8.2 (constraint was <any>)
  found candidate ipython==6.2.0 (constraint was <any>)
  found candidate pre-commit==1.1.2 (constraint was ==1.1.2)
  found candidate pytest==3.0.7 (constraint was ==3.0.7)
  found candidate pytest-django==3.1.2 (constraint was <any>)
  found candidate pytest-flake8==0.8.1 (constraint was ==0.8.1)
  found candidate pytest-isort==0.1.0 (constraint was ==0.1.0)
  found candidate pytest-xdist==1.20.0 (constraint was <any>)
  found candidate safety==1.5.1 (constraint was <any>)

Finding secondary dependencies:
  pre-commit==1.1.2         requires aspy.yaml, cached-property, identify>=1.0.0, nodeenv>=0.11.1, pyyaml, six, virtualenv
  pytest-xdist==1.20.0      requires execnet>=1.1, pytest-forked, pytest>=3.0.0
  flake8-commas==0.4.3      requires flake8<4.0.0,>=2
  gitlint==0.8.2            requires arrow==0.10.0, Click==6.6, ordereddict==1.1, sh==1.11; sys_platform != "win32"
  flake8-blind-except==0.1.1 requires setuptools
  pytest==3.0.7             requires py>=1.4.29, setuptools
  flake8-quotes==0.9.0      requires flake8
  ipython==6.2.0 not in cache, need to check index
Traceback (most recent call last):
  File "/usr/local/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/cli.py", line 1649, in lock
    do_lock(verbose=verbose, clear=clear)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/cli.py", line 907, in do_lock
    project=project
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/utils.py", line 217, in resolve_deps
    resolved_tree = resolver.resolve()
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/resolver.py", line 107, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/resolver.py", line 195, in _resolve_one_round
    for dep in self._iter_dependencies(best_match):
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/resolver.py", line 274, in _iter_dependencies
    dependencies = self.repository.get_dependencies(ireq)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/repositories/pypi.py", line 145, in get_dependencies
    self._dependencies_cache[ireq] = reqset._prepare_file(self.finder, ireq)
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 634, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 129, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/req/req_install.py", line 439, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /var/folders/qn/2gssw9hx48g81chw0398hlrr0000gn/T/tmpy2igTrbuild/ipython/
@kennethreitz

This comment has been minimized.

Show comment
Hide comment
@kennethreitz

kennethreitz Sep 20, 2017

Contributor

Also, safety is built into pipenv now! You can just run pipenv check and it'll run safety for you :)

Contributor

kennethreitz commented Sep 20, 2017

Also, safety is built into pipenv now! You can just run pipenv check and it'll run safety for you :)

@kennethreitz

This comment has been minimized.

Show comment
Hide comment
@kennethreitz

kennethreitz Sep 20, 2017

Contributor

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.

Contributor

kennethreitz commented Sep 20, 2017

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.

@kennethreitz

This comment has been minimized.

Show comment
Hide comment
@kennethreitz

kennethreitz Sep 20, 2017

Contributor

Check out pipenv check and let me know what you think :)

Contributor

kennethreitz commented Sep 20, 2017

Check out pipenv check and let me know what you think :)

@sobolevn

This comment has been minimized.

Show comment
Hide comment
@sobolevn

sobolevn Sep 20, 2017

Contributor

Nice! Replaced my old configuration with pipenv check.

Contributor

sobolevn commented Sep 20, 2017

Nice! Replaced my old configuration with pipenv check.

@kennethreitz

This comment has been minimized.

Show comment
Hide comment
@kennethreitz

kennethreitz Sep 20, 2017

Contributor

<3

Contributor

kennethreitz commented Sep 20, 2017

<3

andrei-duhnea added a commit to andrei-duhnea/xworkflows-play that referenced this issue Sep 22, 2017

Remove ipython from dev-packages
pip-tools has an issue with ipython's setup.py, see:
pypa/pipenv#515
@GaramNick

This comment has been minimized.

Show comment
Hide comment
@GaramNick

GaramNick Oct 17, 2017

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.

GaramNick commented Oct 17, 2017

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.

@nsecord

This comment has been minimized.

Show comment
Hide comment
@nsecord

nsecord Oct 30, 2017

I am getting the same error trying to install jupyter.

I create a new environment

pipenv --three

then I try to install

pipenv install jupyter

Traceback (most recent call last):
  File "/usr/local/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/pipenv/cli.py", line 1847, in install
    do_lock(system=system, pre=pre)
  File "/usr/local/lib/python2.7/site-packages/pipenv/cli.py", line 1082, in do_lock
    pre=pre
  File "/usr/local/lib/python2.7/site-packages/pipenv/utils.py", line 452, in resolve_deps
    resolved_tree.update(resolver.resolve(max_rounds=PIPENV_MAX_ROUNDS))
  File "/usr/local/lib/python2.7/site-packages/pipenv/patched/piptools/resolver.py", line 102, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/usr/local/lib/python2.7/site-packages/pipenv/patched/piptools/resolver.py", line 200, in _resolve_one_round
    for dep in self._iter_dependencies(best_match):
  File "/usr/local/lib/python2.7/site-packages/pipenv/patched/piptools/resolver.py", line 278, in _iter_dependencies
    for dependency in self.repository.get_dependencies(ireq):
  File "/usr/local/lib/python2.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 153, in get_dependencies
    result = reqset._prepare_file(self.finder, ireq)
  File "/usr/local/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 639, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/usr/local/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 134, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "/usr/local/lib/python2.7/site-packages/pipenv/patched/pip/req/req_install.py", line 438, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/local/lib/python2.7/site-packages/pipenv/patched/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /var/folders/g1/srsny26x1ddfd469qxj675zw0000gn/T/tmpxfkWdlbuild/functools32/

If I run pip install --three jupyter, it removes the existing Python3 environment, creates a new Python3 environment and then I get the same error message again.

If I remove the Pipfile and Pipfile.lock and redo using Python 2 pip install --two jupyter, everything runs smoothly and installs.

It seems that if you want to install Jupyter for a Python3 environment, it wants to be installed using pip3 explicitly (at least that is what they say in the installation instructions).

If I understand correctly, pipenv will invoke pip to do the package installation but if you have a legacy Python2 installation, pip will point to pip2. So what do you do in this case when you want to create a Python3 environment?

My expectation was that when I create a new environment with pipenv --three, it should invoke pip3 each time I install a package via pipenv install package. It doesn't seem to be the case or am I doing something wrong?

nsecord commented Oct 30, 2017

I am getting the same error trying to install jupyter.

I create a new environment

pipenv --three

then I try to install

pipenv install jupyter

Traceback (most recent call last):
  File "/usr/local/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/pipenv/cli.py", line 1847, in install
    do_lock(system=system, pre=pre)
  File "/usr/local/lib/python2.7/site-packages/pipenv/cli.py", line 1082, in do_lock
    pre=pre
  File "/usr/local/lib/python2.7/site-packages/pipenv/utils.py", line 452, in resolve_deps
    resolved_tree.update(resolver.resolve(max_rounds=PIPENV_MAX_ROUNDS))
  File "/usr/local/lib/python2.7/site-packages/pipenv/patched/piptools/resolver.py", line 102, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/usr/local/lib/python2.7/site-packages/pipenv/patched/piptools/resolver.py", line 200, in _resolve_one_round
    for dep in self._iter_dependencies(best_match):
  File "/usr/local/lib/python2.7/site-packages/pipenv/patched/piptools/resolver.py", line 278, in _iter_dependencies
    for dependency in self.repository.get_dependencies(ireq):
  File "/usr/local/lib/python2.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 153, in get_dependencies
    result = reqset._prepare_file(self.finder, ireq)
  File "/usr/local/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 639, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/usr/local/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 134, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "/usr/local/lib/python2.7/site-packages/pipenv/patched/pip/req/req_install.py", line 438, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/local/lib/python2.7/site-packages/pipenv/patched/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /var/folders/g1/srsny26x1ddfd469qxj675zw0000gn/T/tmpxfkWdlbuild/functools32/

If I run pip install --three jupyter, it removes the existing Python3 environment, creates a new Python3 environment and then I get the same error message again.

If I remove the Pipfile and Pipfile.lock and redo using Python 2 pip install --two jupyter, everything runs smoothly and installs.

It seems that if you want to install Jupyter for a Python3 environment, it wants to be installed using pip3 explicitly (at least that is what they say in the installation instructions).

If I understand correctly, pipenv will invoke pip to do the package installation but if you have a legacy Python2 installation, pip will point to pip2. So what do you do in this case when you want to create a Python3 environment?

My expectation was that when I create a new environment with pipenv --three, it should invoke pip3 each time I install a package via pipenv install package. It doesn't seem to be the case or am I doing something wrong?

@techalchemy

This comment has been minimized.

Show comment
Hide comment
@techalchemy

techalchemy Oct 30, 2017

Member

@nsecord please open a separate issue and provide relevant information including everything the issue template asks for as well as the output of which pip && which pipenv && which python && pip --version && pipenv --version && python --version && env

Member

techalchemy commented Oct 30, 2017

@nsecord please open a separate issue and provide relevant information including everything the issue template asks for as well as the output of which pip && which pipenv && which python && pip --version && pipenv --version && python --version && env

@Monireh2

This comment has been minimized.

Show comment
Hide comment
@Monireh2

Monireh2 Nov 16, 2017

I had the same problem. Upgrading the pip from 8 to 9, resolved my issue!

Monireh2 commented Nov 16, 2017

I had the same problem. Upgrading the pip from 8 to 9, resolved my issue!

@StupacShakur82

This comment has been minimized.

Show comment
Hide comment
@StupacShakur82

StupacShakur82 Dec 22, 2017

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

StupacShakur82 commented Dec 22, 2017

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

@lyndsysimon

This comment has been minimized.

Show comment
Hide comment
@lyndsysimon

lyndsysimon Feb 19, 2018

I had this problem on macOS. I fixed it by removing everything installed through homebrew and re-installing Python 3.6.

lyndsysimon commented Feb 19, 2018

I had this problem on macOS. I fixed it by removing everything installed through homebrew and re-installing Python 3.6.

@pmuthyala

This comment has been minimized.

Show comment
Hide comment
@pmuthyala

pmuthyala Feb 26, 2018

Hello, am facing the same error on windows:

  • installed python-3.6.4-embed-amd64 as a zip file
    -set PATH env variable for python, installed pip
    -when i run python -m pip install awscli i get below error:

    Running setup.py (path:C:\Users\user\AppData\Local\Temp\pip-build-7grntnir\PyYAML\setup.py) egg_info for package PyYAML
    Running command python setup.py egg_info
    running egg_info
    creating pip-egg-info\PyYAML.egg-info
    writing pip-egg-info\PyYAML.egg-info\PKG-INFO
    writing dependency_links to pip-egg-info\PyYAML.egg-info\dependency_links.txt
    writing top-level names to pip-egg-info\PyYAML.egg-info\top_level.txt
    writing manifest file 'pip-egg-info\PyYAML.egg-info\SOURCES.txt'
    error: [Errno 2] No such file or directory: 'C:\python-3.6.4-embed-amd64\python36.zip\lib2to3\Grammar.txt'
    Cleaning up...
    Command "python setup.py egg_info" failed with error code 1 in C:\Users\user\AppData\Local\Temp\pip-build-7grntnir\PyYAML
    Exception information:
    Traceback (most recent call last):
    File "C:\python-3.6.4-embed-amd64\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
    File "C:\python-3.6.4-embed-amd64\lib\site-packages\pip\commands\install.py", line 335, in run
    wb.build(autobuilding=True)
    File "C:\python-3.6.4-embed-amd64\lib\site-packages\pip\wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
    File "C:\python-3.6.4-embed-amd64\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
    File "C:\python-3.6.4-embed-amd64\lib\site-packages\pip\req\req_set.py", line 634, in prepare_file
    abstract_dist.prep_for_dist()
    File "C:\python-3.6.4-embed-amd64\lib\site-packages\pip\req\req_set.py", line 129, in prep_for_dist
    self.req_to_install.run_egg_info()
    File "C:\python-3.6.4-embed-amd64\lib\site-packages\pip\req\req_install.py", line 439, in run_egg_info
    command_desc='python setup.py egg_info')
    File "C:\python-3.6.4-embed-amd64\lib\site-packages\pip\utils_init
    .py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
    pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in C:\Users\user\AppData\Local\Temp\pip-build-7grntnir\PyYAML\

Though the error complains about this file missing: error: [Errno 2] No such file or directory: 'C:\python-3.6.4-embed-amd64\python36.zip\lib2to3\Grammar.txt'

i have this file in that the same location, still i have this error. Any help appreciated!

My pip version is:

C:\python-3.6.4-embed-amd64\Lib\site-packages\pip>python -m pip --version
pip 9.0.1 from C:\python-3.6.4-embed-amd64\lib\site-packages (python 3.6)

pmuthyala commented Feb 26, 2018

Hello, am facing the same error on windows:

  • installed python-3.6.4-embed-amd64 as a zip file
    -set PATH env variable for python, installed pip
    -when i run python -m pip install awscli i get below error:

    Running setup.py (path:C:\Users\user\AppData\Local\Temp\pip-build-7grntnir\PyYAML\setup.py) egg_info for package PyYAML
    Running command python setup.py egg_info
    running egg_info
    creating pip-egg-info\PyYAML.egg-info
    writing pip-egg-info\PyYAML.egg-info\PKG-INFO
    writing dependency_links to pip-egg-info\PyYAML.egg-info\dependency_links.txt
    writing top-level names to pip-egg-info\PyYAML.egg-info\top_level.txt
    writing manifest file 'pip-egg-info\PyYAML.egg-info\SOURCES.txt'
    error: [Errno 2] No such file or directory: 'C:\python-3.6.4-embed-amd64\python36.zip\lib2to3\Grammar.txt'
    Cleaning up...
    Command "python setup.py egg_info" failed with error code 1 in C:\Users\user\AppData\Local\Temp\pip-build-7grntnir\PyYAML
    Exception information:
    Traceback (most recent call last):
    File "C:\python-3.6.4-embed-amd64\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
    File "C:\python-3.6.4-embed-amd64\lib\site-packages\pip\commands\install.py", line 335, in run
    wb.build(autobuilding=True)
    File "C:\python-3.6.4-embed-amd64\lib\site-packages\pip\wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
    File "C:\python-3.6.4-embed-amd64\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
    File "C:\python-3.6.4-embed-amd64\lib\site-packages\pip\req\req_set.py", line 634, in prepare_file
    abstract_dist.prep_for_dist()
    File "C:\python-3.6.4-embed-amd64\lib\site-packages\pip\req\req_set.py", line 129, in prep_for_dist
    self.req_to_install.run_egg_info()
    File "C:\python-3.6.4-embed-amd64\lib\site-packages\pip\req\req_install.py", line 439, in run_egg_info
    command_desc='python setup.py egg_info')
    File "C:\python-3.6.4-embed-amd64\lib\site-packages\pip\utils_init
    .py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
    pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in C:\Users\user\AppData\Local\Temp\pip-build-7grntnir\PyYAML\

Though the error complains about this file missing: error: [Errno 2] No such file or directory: 'C:\python-3.6.4-embed-amd64\python36.zip\lib2to3\Grammar.txt'

i have this file in that the same location, still i have this error. Any help appreciated!

My pip version is:

C:\python-3.6.4-embed-amd64\Lib\site-packages\pip>python -m pip --version
pip 9.0.1 from C:\python-3.6.4-embed-amd64\lib\site-packages (python 3.6)

@jeffreyjharris

This comment has been minimized.

Show comment
Hide comment
@jeffreyjharris

jeffreyjharris Mar 9, 2018

macOS Sierra
upgrading pyobjc-core also worked for me.

jeffreyjharris commented Mar 9, 2018

macOS Sierra
upgrading pyobjc-core also worked for me.

@Sunilsma

This comment has been minimized.

Show comment
Hide comment
@Sunilsma

Sunilsma May 8, 2018

hello dear sir/mam , I m also getting same error in python 3.4 plzz help me.
C:\Users>pip install oauth2==1.5.211
Collecting oauth2==1.5.211
Using cached https://files.pythonhosted.org/packages/ef/36/7da831a06da70fb15858773a1d709606abcd05fae417bdf7a8cf5349450c/oauth2-1.5.211.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\AppData\Local\Temp\pip-install-oef36la6\oauth2\setup.py", line 18
print "unable to find version in %s" % (VERSIONFILE,)
^
SyntaxError: invalid syntax

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in C:\User\AppData\Local\Temp\pip-install-oef36la6\oauth2\

Sunilsma commented May 8, 2018

hello dear sir/mam , I m also getting same error in python 3.4 plzz help me.
C:\Users>pip install oauth2==1.5.211
Collecting oauth2==1.5.211
Using cached https://files.pythonhosted.org/packages/ef/36/7da831a06da70fb15858773a1d709606abcd05fae417bdf7a8cf5349450c/oauth2-1.5.211.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\AppData\Local\Temp\pip-install-oef36la6\oauth2\setup.py", line 18
print "unable to find version in %s" % (VERSIONFILE,)
^
SyntaxError: invalid syntax

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in C:\User\AppData\Local\Temp\pip-install-oef36la6\oauth2\

@uranusjr

This comment has been minimized.

Show comment
Hide comment
@uranusjr

uranusjr May 8, 2018

Member

@Sunilsma oauth2 1.5.211 does not support Python 3.4. You can clearly see Python 2 syntax in the traceback, which shouldn’t have triggered alarms if you read it. I don’t know what you’re trying to achieve here.

Member

uranusjr commented May 8, 2018

@Sunilsma oauth2 1.5.211 does not support Python 3.4. You can clearly see Python 2 syntax in the traceback, which shouldn’t have triggered alarms if you read it. I don’t know what you’re trying to achieve here.

@hp98us

This comment has been minimized.

Show comment
Hide comment
@hp98us

hp98us Aug 19, 2018

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

I am facing this issue please help.

hp98us commented Aug 19, 2018

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

This comment has been minimized.

Show comment
Hide comment
@techalchemy

techalchemy Aug 19, 2018

Member

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.

Member

techalchemy commented Aug 19, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment