-
-
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
InstallationError is masking actual error #2791
Comments
For some reason pip prints the traceback to stdout, not stderr. The solution is therefore to print stdout and stderr when |
I am very sure there is an issue open somewhere that tracks this problem, but I just can’t find it. Leaving this open for now… |
I have the same problem. |
Same |
export AIRFLOW_GPL_UNIDECODE=yes. OR export SLUGIFY_USES_TEXT_UNIDECODE=yes |
This didn't work for me. |
@NijilChandran This is an issue about Pipenv, not pip. Y are using a different tool. |
this does not work. I have the same error on python3.5 |
What doesn't work, what error? An error installing airflow? Please provide details, with logs, the issue tracker gets quite a lot of traffic, so simply making some general statements about your problem in a thread where at least 3 different issues are discussed can be frustrating. We didn't fix airflow, you still need to set some environment variables and install the system level dependencies properly. Please find a tutorial or consult stack overflow for details about that -- it can be pretty complicated and we don't have any expertise in that subject If you still think you are having a pipenv related issue, please provide details and logs about your issue, with specifics. We will be more than happy to try and sort through that with you, but it will be pretty difficult without details! |
@techalchemy You are right. Sorry for that. Here it goes: 1 - [[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
setuptools = "*"
virtualenv = "*"
apache-airflow = "*"
[packages]
wheel = "*"
pylint = "*"
cffi = "*"
paramiko = "*"
jsonschema = "*"
recordtype = "*"
recordclass = "*"
twine = "*"
unidecode = "*"
docutils = "*"
flask-login = "==0.3.2"
[requires]
python_version = "3.5" 3 - StackTrace:
4 - then I tried with the var: |
I got the same error when installing airflow with
However, I've managed to bypass the problem and installed airflow successfully. The followings are my attempts: Step 1: create a pipenv environment Step 2: setup the environment variable
Step 3: activate the pipenv environment
Step 4: install airflow using pip within the pipenv environment
Results
|
@uranusjr I'm also experiencing the issue of InstallationError masking an actual error. I found a comment in another thread that references it as well. Maybe that's what you were thinking was the open issue? #1035 (comment) |
For anyone unfamiliar with the python ecosystem that's running into this issue, running the same installation with |
Along with export AIRFLOW_GPL_UNIDECODE=yes. OR export SLUGIFY_USES_TEXT_UNIDECODE=yes |
I'm experiencing the problem attempting to install TensorFlow version <2.0.0. In my case pipenv install 'tensorflow<2.0.0' is attempting to pull in functools32 - a backwards compatibility library that never can install on Python3. This is an indication that 'pipenv' is either hardcoding a python 2.7 dependency or is failing to indicate in commonly used ways, the notion that the target environment is Python 3. My environment: Ubuntu 18, Python 3.7.5 (installed via pyenv). Pipenv (v 2018.11.26) installed. FAILS Recovery requires hand editing Pipfile to remove the "TensorFlow" line. Otherwise it will fail and fail and fail. WORKS Of course, now pipenv really does not understand that TensorFlow has been installed. Any suggestions on a workaround util someone discovers and corrects the differences betweenn pip and pipenv that lead to this failure mode? |
The problem I'm experiencing is due to the fact that under pipenv the python major version data is not indicating a major version of 3. I'm not sure why this would be but this appears to be the case. This is a snippet from TensorFlow 1.15.0 setup.py that indicates the point when Tensorflow installation decides it needs to install packages specific to Python 2: # python3 requires wheel 0.26
if sys.version_info.major == 3:
REQUIRED_PACKAGES.append('wheel >= 0.26')
else:
REQUIRED_PACKAGES.append('wheel')
# mock comes with unittest.mock for python3, need to install for python2
REQUIRED_PACKAGES.append('mock >= 2.0.0')
# functools comes with python3, need to install the backport for python2
REQUIRED_PACKAGES.append('functools32 >= 3.2.3') |
Raise a `DependencyFileNotResolvable` error when pipenv fails to install dependencies require missing system level dependenceis. The error message parsing is pretty gnarly as the only reference of the offending dependency is in a tmp build path in the error message. In the test case pipenv failed to install `rtree` because it requires a system level dependency: `libspatialindex`. We don't want to install this in our ever growning dockerfile so attempt to explain the error to users. The underlying cause might be obscured by this open issue in pipenv: pypa/pipenv#2791 Similarly, there's an open issue to fix the system requirement in rtree: Toblerity/rtree#147 This is the error pipenv raises: ``` pipenv.patched.notpip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/tmp8jk2atvgbuild/rtree/ File "/usr/local/.pyenv/versions/3.9.0/lib/python3.9/site-packages/pipenv/resolver.py", line 126, in <module> main() File "/usr/local/.pyenv/versions/3.9.0/lib/python3.9/site-packages/pipenv/resolver.py", line 118, in main _main(parsed.pre, parsed.clear, parsed.verbose, parsed.system, File "/usr/local/.pyenv/versions/3.9.0/lib/python3.9/site-packages/pipenv/resolver.py", line 78, in _main results = resolve( File "/usr/local/.pyenv/versions/3.9.0/lib/python3.9/site-packages/pipenv/resolver.py", line 61, in resolve return resolve_deps( File "/usr/local/.pyenv/versions/3.9.0/lib/python3.9/site-packages/pipenv/utils.py", line 718, in resolve_deps resolved_tree, hashes, markers_lookup, resolver = actually_resolve_deps( File "/usr/local/.pyenv/versions/3.9.0/lib/python3.9/site-packages/pipenv/utils.py", line 480, in actually_resolve_deps resolved_tree = resolver.resolve() File "/usr/local/.pyenv/versions/3.9.0/lib/python3.9/site-packages/pipenv/utils.py", line 385, in resolve results = self.resolver.resolve(max_rounds=environments.PIPENV_MAX_ROUNDS) File "/usr/local/.pyenv/versions/3.9.0/lib/python3.9/site-packages/pipenv/patched/piptools/resolver.py", line 102, in resolve has_changed, best_matches = self._resolve_one_round() File "/usr/local/.pyenv/versions/3.9.0/lib/python3.9/site-packages/pipenv/patched/piptools/resolver.py", line 206, in _resolve_one_round for dep in self._iter_dependencies(best_match): File "/usr/local/.pyenv/versions/3.9.0/lib/python3.9/site-packages/pipenv/patched/piptools/resolver.py", line 301, in _iter_dependencies dependencies = self.repository.get_dependencies(ireq) File "/usr/local/.pyenv/versions/3.9.0/lib/python3.9/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 234, in get_dependencies legacy_results = self.get_legacy_dependencies(ireq) File "/usr/local/.pyenv/versions/3.9.0/lib/python3.9/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 426, in get_legacy_dependencies results, ireq = self.resolve_reqs(download_dir, ireq, wheel_cache) File "/usr/local/.pyenv/versions/3.9.0/lib/python3.9/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 297, in resolve_reqs results = resolver._resolve_one(reqset, ireq) File "/usr/local/.pyenv/versions/3.9.0/lib/python3.9/site-packages/pipenv/patched/notpip/_internal/resolve.py", line 260, in _resolve_one abstract_dist = self._get_abstract_dist_for(req_to_install) File "/usr/local/.pyenv/versions/3.9.0/lib/python3.9/site-packages/pipenv/patched/notpip/_internal/resolve.py", line 211, in _get_abstract_dist_for abstract_dist = self.preparer.prepare_linked_requirement( File "/usr/local/.pyenv/versions/3.9.0/lib/python3.9/site-packages/pipenv/patched/notpip/_internal/operations/prepare.py", line 294, in prepare_linked_ abstract_dist.prep_for_dist(finder, self.build_isolation) File "/usr/local/.pyenv/versions/3.9.0/lib/python3.9/site-packages/pipenv/patched/notpip/_internal/operations/prepare.py", line 127, in prep_for_dist self.req.run_egg_info() File "/usr/local/.pyenv/versions/3.9.0/lib/python3.9/site-packages/pipenv/patched/notpip/_internal/req/req_install.py", line 470, in run_egg_info call_subprocess( File "/usr/local/.pyenv/versions/3.9.0/lib/python3.9/site-packages/pipenv/patched/notpip/_internal/utils/misc.py", line 703, in call_subprocess raise InstallationError( pipenv.patched.notpip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/tmp8jk2atvgbuild/rtree/ ```
@matteius 👋 from the team. and I see this is closed, but no linked commit or any other updates... can you clarify if this is closed as resolved or closed as wontfix/stale?? |
@jeffwidman I believe this was fixed prior to me joining the project -- I closed it because I was unable to reproduce it. I have another update for dependabot team though -- which is in the |
Thanks @matteius very helpful. I moved your request to dependabot/dependabot-core#6836 so we can track it properly. Def in the future please feel free to swing by our issue tracker anytime to suggest improvements in how we call |
In case it helps someone, I think this is caused by #5897. For us, explicit passing |
Just to wrap things up here. Indeed #5897 started hiding pip errors by default. Using the |
Issue description
installing airflow using pipenv is failing due to internal airflow error
RuntimeError: By default one of Airflow's dependencies installs a GPL dependency (unidecode). To avoid this dependency set SLUGIFY_USES_TEXT_UNIDECODE=yes in your environment when you install or upgrade Airflow. To force installing the GPL version set AIRFLOW_GPL_UNIDECODE
the error is masked by pipenv and show only
pipenv.patched.notpip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /var/folders/db/wy74wjzd0n59f__0jrkk1f3c0000gn/T/tmpru4ovmu6build/apache-airflow/
Expected result
would expect to see the internal error message
Actual result
Steps to replicate
install airflow using pipenv without seting
SLUGIFY_USES_TEXT_UNIDECODE
orAIRFLOW_GPL_UNIDECODE
flagspipenv --support
$ pipenv --support
Pipenv version:
'2018.7.1'
Pipenv location:
'/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pipenv'
Python location:
'/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6'
Other Python installations in
PATH
:2.7
:/usr/local/bin/python2.7
2.7
:/usr/local/bin/python2.7
2.7
:/usr/bin/python2.7
3.6
:/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6m
3.6
:/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6
3.6
:/usr/local/bin/python3.6
3.7
:/Users/danielc/.pyenv/shims/python3.7
2.7.15
:/Users/danielc/.pyenv/shims/python
2.7.15
:/usr/local/bin/python
2.7.10
:/usr/bin/python
2.7.15
:/usr/local/bin/python2
3.6.5
:/Users/danielc/.pyenv/shims/python3
3.6.5
:/Library/Frameworks/Python.framework/Versions/3.6/bin/python3
3.6.5
:/usr/local/bin/python3
PEP 508 Information:
System environment variables:
TERM_SESSION_ID
SSH_AUTH_SOCK
Apple_PubSub_Socket_Render
COLORFGBG
ITERM_PROFILE
XPC_FLAGS
PWD
SHELL
SECURITYSESSIONID
LC_CTYPE
TERM_PROGRAM_VERSION
TERM_PROGRAM
PATH
DISPLAY
COLORTERM
COMMAND_MODE
TERM
HOME
TMPDIR
USER
XPC_SERVICE_NAME
LOGNAME
__CF_USER_TEXT_ENCODING
ITERM_SESSION_ID
SHLVL
OLDPWD
ZSH
PAGER
LESS
LSCOLORS
EDITOR
NVM_DIR
NVM_CD_FLAGS
NVM_BIN
FZF_DEFAULT_COMMAND
LC_ALL
LANG
GOPATH
PYENV_ROOT
PYENV_SHELL
_
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/Users/danielc/.pyenv/shims:/Users/danielc/.pyenv/bin:/Users/danielc/go/bin:/usr/local/opt/[email protected]/bin:/Users/danielc/.nvm/versions/node/v8.9.1/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/opt/go/libexec/bin
SHELL
:/bin/zsh
EDITOR
:nvim
LANG
:en_US.UTF-8
PWD
:/Users/danielc/dev/data/airflow_home
Contents of
Pipfile
('/Users/danielc/dev/data/airflow_home/Pipfile'):Contents of
Pipfile.lock
('/Users/danielc/dev/data/airflow_home/Pipfile.lock'):The text was updated successfully, but these errors were encountered: