-
-
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
Pipenv fails to install latest version of pyarrow on linux #1988
Comments
I get your frustration but you must understand that pip and pipenv are fundamentally different. Pipenv can also install the correct version, the issue is dependency resolution which is non-deterministic. This means that what ends up in your lockfile is to some extent dependent on what the author of the package does in their setup file. If they simply don’t cut a release for one specific platform I’m afraid there isn’t much we can do. |
Hey, thanks for the quick answer. |
@HeavenVolkoff It’s a pretty difficult situation. Generally Pipenv tries to use the same version if possible, so your build is stable across platforms, which is the point of a lock file. You wouldn’t be able to guarantee deterministic builds if it always installs the latest version, and this is generally what you want if you use Pipenv. The best solution to this would be for pyarrow to release 0.9.0post1 for all platforms. This is the best practice for platforms with well-established version locking practices, since it is not as reasonable to require users to specify different versions on cross-platform builds. Python, unfortunately, does not have a well-established culture in this aspect, but it is still a nice thing to do anyway. With that said, maybe Pipfile should be able to specify a package with different versions based on environment markers, as @frostming mentioned—see #1967 (comment). This would provide a workaround to this problem. |
I understand the problem, and agree that the best would be for pyarrow to standardise it's release version across platforms. But the possibility for multiple entries with different markers in Pipfile would be a good work-around IMHO. Anyway, thanks for the help, I will put a comment in the other issue in favor of this feature. |
It’s not about having multiple entries or not. If you run resolution on platforms A or B, you get one result, but if you run resolution on platform C, you get a different result. Since these platforms are different and resolve differently, and pipenv uses a resolver to resolve dependencies (that is the nature of the tool after all), platforms A and B don’t even know that anything is different about platform C. You see, this knowledge would be impossible to have unless you were platform C. That’s the nature of how pythons packaging ecosystem operates unfortunately. This would be no problem if in fact the difference were indicated in markers but markers are not the same as version numbers or post releases. Pip doesn’t even touch the wheels for incompatible platforms, so we will literally never know about a version discrepancy like this. So I know you might think you’re asking for something simple (judging by your request that we simply add another entry), but you aren’t. Please appreciate that we don’t enjoy having issues like this, if it were easy to fix we would have done it already. |
Hello, I think my issue might have been misunderstood. If you initialize a clean pipenv environment, under Linux, and attempt to install pyarrow, it will fail. Should this be the correct behavior for pipenv? Even considering pyarrow versions discrepancies under different platforms. |
@HeavenVolkoff it shouldn't fail in a clean environment, but what you posted was installing from an existing lockfile -- can you give us the logs from a clean install if that is failing? |
Sure, here it is... |
Well based on those logs pyarrow requires futures which you can never install on python 3 so I don’t see how this will ever work |
So, that's the weird thing. |
Oh. Upgrade pipenv. You were hitting a resolver bug that should be fixed. |
Also seeing this issue, latest pipenv. |
Can’t we just tell pyarrow to please make the post1 version available for every platform? Did anyone actually try to raise the issue to them? |
@uranusjr I don't understand the cause of the issue well enough. I can
|
pyarrow 0.9.0 contains a packaging problem (iirc), and the wheels they built for macOS couldn’t be installed. To remedy this (you cannot re-upload a file with the same name on PyPI, in case you’re wondering), they released 0.9.0.post1, which only contains macOS wheels. This means that when you When Pipenv does locking, it needs to (well, tries to) make the lock file cross-platform. With a wildcard installation ( pip works because it only needs to care about the platform you’re running on. There is a valid latest version no matter where it is running, and that’s good enough for pip. Knowing the root cause, you can actually work around this problem by |
Thank you for the detailed explanation @uranusjr. There is an existing, closed issue apache/arrow#1950 in the arrow project. |
@kadrach Thanks for the effort! |
Pipenv fails to install and sync latest version of pyarrow on linux. As far as I could tell this is due to a difference between their versioning of the latest release:
When I attempt to install pyarrow on a linux, pipenv returns the following:
And on a macOS, it works:
Howerver if I specify the version to: pyarrow==0.9.0
On linux, it works:
And on macOS, it does not:
I know that this is a edge case, and according to here, it should be fixed when the pyarrow team releases a working macOS wheel of the 0.9.0 version. However pip can correctly identify and install each OS specific version. So, I, personally, think this should work on pipenv too.
$ python -m pipenv.help output
Pipenv version:
'11.9.0'
Pipenv location:
'/usr/local/lib/python3.6/dist-packages/pipenv'
Python location:
'/home/vasv/.local/bin/python'
Other Python installations in
PATH
:2.7
:/usr/bin/python2.7
2.7
:/usr/bin/python2.7
3.6
:/usr/bin/python3.6m
3.6
:/usr/bin/python3.6
3.6.3
:/home/vasv/.local/bin/python
2.7.14
:/usr/bin/python
2.7.14
:/usr/bin/python2
3.6.3
:/usr/bin/python3
PEP 508 Information:
System environment variables:
LS_COLORS
LESSCLOSE
LANG
GDM_LANG
HISTIGNORE
DISPLAY
COLORTERM
NO_AT_BRIDGE
XDG_VTNR
SSH_AUTH_SOCK
MANDATORY_PATH
S_COLORS
XDG_SESSION_ID
XDG_GREETER_DATA_DIR
USER
DESKTOP_SESSION
DEFAULTS_PATH
QT_QPA_PLATFORMTHEME
PWD
HOME
SSH_AGENT_PID
QT_ACCESSIBILITY
XDG_SESSION_TYPE
XDG_DATA_DIRS
XDG_SESSION_DESKTOP
TERM
SHELL
XDG_SEAT_PATH
SHLVL
XDG_SEAT
LANGUAGE
WINDOWID
GDMSESSION
TERMINFO
LOGNAME
DBUS_SESSION_BUS_ADDRESS
XDG_RUNTIME_DIR
XAUTHORITY
XDG_SESSION_PATH
XDG_CONFIG_DIRS
PATH
PS1
PKG_CONFIG_PATH
PYTHON
GCC_COLORS
LESSOPEN
_
OLDPWD
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
PYTHONUNBUFFERED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/home/vasv/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
SHELL
:/bin/bash
LANG
:en_US.UTF-8
PWD
:/home/vasv/Workspace/antenna_protocol
Contents of
Pipfile
('/home/vasv/Workspace/antenna_protocol/Pipfile'):Contents of
Pipfile.lock
('/home/vasv/Workspace/antenna_protocol/Pipfile.lock'):$ python -m pipenv.help output
Pipenv version:
'11.9.0'
Pipenv location:
'/usr/local/lib/python3.6/site-packages/pipenv'
Python location:
'/usr/local/opt/python/bin/python3.6'
Other Python installations in
PATH
: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.5
:/usr/local/opt/python/libexec/bin/python
2.7.10
:/usr/bin/python
3.6.5
:/usr/local/bin/python3
PEP 508 Information:
System environment variables:
LANG
XPC_FLAGS
HISTIGNORE
DISPLAY
TERM_SESSION_ID
EDITOR
JAVA_HOME
SSH_AUTH_SOCK
USER
LSCOLORS
PWD
HOME
LC_CTYPE
TERM_PROGRAM
TERM_PROGRAM_VERSION
Apple_PubSub_Socket_Render
TMPDIR
XPC_SERVICE_NAME
SHELL
TERM
SHLVL
CPPFLAGS
LOGNAME
LDFLAGS
PATH
PS1
PYTHON
HOMEBREW_GITHUB_API_TOKEN
_
OLDPWD
__CF_USER_TEXT_ENCODING
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
PYTHONUNBUFFERED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/usr/local/bin:/usr/local/sbin:/usr/local/opt/python/libexec/bin:/usr/local/opt/go/libexec/bin:/usr/bin:/bin:/usr/sbin:/sbin
SHELL
:/usr/local/bin/bash
EDITOR
:code
LANG
:en_US.UTF-8
PWD
:/Users/hvolkoff/Workspace/Python/antenna_protocol
Contents of
Pipfile
('/Users/hvolkoff/Workspace/Python/antenna_protocol/Pipfile'):Contents of
Pipfile.lock
('/Users/hvolkoff/Workspace/Python/antenna_protocol/Pipfile.lock'):Expected result
Pipenv should correctly install each OS specific version.
Actual result
Pipenv fails to install latest version of pyarrow under Linux
Steps to replicate
Install pyarrow under Linux with pipenv
The text was updated successfully, but these errors were encountered: