-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Unhelpful message if local package build (setup.py egg_info) fails with underlying exception #2329
Comments
I think #2314 handles this— can you check? |
Just checked - sadly not 😢. |
I did some digging. The exception you see is masking the real error, which can be obtained if you run
PBR requires a setup.cfg containing needed information, but you’re not providing it. We need to somehow get Pipenv to display the underlying error instead of a generic “Command "python setup.py egg_info" failed with error code 1”. It is really unhelpful. |
Is there a workaround when one gets this error message? I am new to pipenv and virtualenv so I am not sure what to do next. Can I use an older version of pipenv or pip? Run some command manually? |
Nevermind. In my case, the root cause was #2584. |
Thanks for the info, that may be a secret culprit on a lot of related issues now that you mention it... |
This will be reported better in the next release Using the example above: ! /t/test pipenv install -e .
Creating a virtualenv for this project…
Pipfile: /tmp/test/Pipfile
Using /home/hawk/.pyenv/versions/3.7.0/bin/python3.7 (3.7.0) to create virtualenv…
⠴Already using interpreter /home/hawk/.pyenv/versions/3.7.0/bin/python3.7
Using base prefix '/home/hawk/.pyenv/versions/3.7.0'
/home/hawk/.pyenv/versions/3.7.0/lib/python3.7/site-packages/virtualenv.py:1041: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
New python executable in /home/hawk/.virtualenvs/test-hxkKlP5o/bin/python3.7
Also creating executable in /home/hawk/.virtualenvs/test-hxkKlP5o/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /home/hawk/.virtualenvs/test-hxkKlP5o
Creating a Pipfile for this project…
Installing -e .…
Obtaining file:///tmp/test
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/test/setup.py", line 12, in <module>
_main()
File "/tmp/test/setup.py", line 8, in _main
pbr=True)
File "/home/hawk/.virtualenvs/test-hxkKlP5o/lib/python3.7/site-packages/setuptools/__init__.py", line 140, in setup
return distutils.core.setup(**attrs)
File "/home/hawk/.pyenv/versions/3.7.0/lib/python3.7/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/home/hawk/.virtualenvs/test-hxkKlP5o/lib/python3.7/site-packages/setuptools/dist.py", line 370, in __init__
k: v for k, v in attrs.items()
File "/home/hawk/.pyenv/versions/3.7.0/lib/python3.7/distutils/dist.py", line 292, in __init__
self.finalize_options()
File "/home/hawk/.virtualenvs/test-hxkKlP5o/lib/python3.7/site-packages/setuptools/dist.py", line 529, in finalize_options
ep.load()(self, ep.name, value)
File "/tmp/test/.eggs/pbr-4.2.0-py3.7.egg/pbr/core.py", line 92, in pbr
'The setup.cfg file %s does not exist.' % path)
distutils.errors.DistutilsFileError: The setup.cfg file /tmp/test/setup.cfg does not exist.
----------------------------------------
Error: An error occurred while installing -e .!
Command "python setup.py egg_info" failed with error code 1 in /tmp/test/
This is likely caused by a bug in -e .. Report this to its maintainers. |
I'm still getting unhelpful errors when there is an installation failure (in my case, a new cftime release was failing because they didn't upload a wheel and I was missing Cython). Any way to enable the debugging? |
|
I don't have any issues installing that library with |
I am getting the same error as @nickwilliams-eventbrite |
I'm facing a similar problem with installing
This makes sense and is a meaningful response. However when I run
The original error is no longer there, and this is not helpful. Seems like |
can u try the master branch and see what it prints? |
All of the below is using master, checked out at 0fa7bd8.
Running
pipenv lock
for a Pipfile that imports a setup.py with asetup_requires
dependency fails with aTypeError: __init__() got an unexpected keyword argument 'download_dir'
error.$ python -m pipenv.help output
Pipenv version:
'2018.05.18'
Pipenv location:
'/Users/greysteil/code/pipenv/pipenv'
Python location:
'/usr/local/opt/python/bin/python3.6'
Other Python installations in
PATH
:2.6
:/usr/bin/python2.6
2.6
:/usr/bin/python2.6
2.7
:/usr/bin/python2.7
2.7
:/usr/bin/python2.7
3.6
:/usr/local/bin/python3.6m
3.6
:/usr/local/bin/python3.6
3.6
:/usr/local/bin/python3.6
3.6.5
:/usr/local/bin/python
3.6.5
:/usr/local/bin/python
2.7.10
:/usr/bin/python
3.6.5
:/usr/local/bin/python3
3.6.5
:/usr/local/bin/python3
PEP 508 Information:
System environment variables:
TERM_PROGRAM
PYENV_ROOT
TERM
SHELL
CLICOLOR
TMPDIR
Apple_PubSub_Socket_Render
TERM_PROGRAM_VERSION
TERM_SESSION_ID
USER
SSH_AUTH_SOCK
__CF_USER_TEXT_ENCODING
LSCOLORS
PATH
PWD
EDITOR
LANG
XPC_FLAGS
RBENV_SHELL
XPC_SERVICE_NAME
HOME
SHLVL
LOGNAME
OLDPWD
_
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/Users/greysteil/.pyenv/bin:/Users/greysteil/.cargo/bin:/usr/local/heroku/bin:/Users/greysteil/.rbenv/shims:/usr/local/bin:./node_modules/.bin:.bundle/binstubs:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/Library/TeX/texbin:/usr/local/sbin
SHELL
:/bin/bash
EDITOR
:subl -w
LANG
:en_GB.UTF-8
PWD
:/Users/greysteil/code/python-test
Contents of
Pipfile
('/Users/greysteil/code/python-test/Pipfile'):Expected result
Install should succeed
Actual result
Steps to replicate
Run
pipenv lock
in a directory with the following:The text was updated successfully, but these errors were encountered: