-
Notifications
You must be signed in to change notification settings - Fork 130
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
error during install of dependencies via pip; Python 3.8; gcc version 10.1.0 #307
Comments
It works if I use installation from sources
|
Thanks for this! I can reproduce it, and it disappears because the new requirements file has scipy>=1.1.0 rather than scipy==1.1.0 . I can install scipy v1.4.0 through pip, but not scipy v1.1.0-v1.1.3 . (don't know why, but here's a link to the release notes: https://github.com/scipy/scipy/releases/tag/v1.4.0 ) I think we should change requirements/requirements.txt to scipy>=1.4.0, and do a release soon - tagging @mmahsereci for review. |
@johannesgiersdorf thanks for a very detailed error report, much appreciated! @MashaNaslidnyk I'd be cautious with this, and would try to keep the deps version as inclusive as possible. Let's deep dive on the error and see if we can fix it, before considering other options. The error file starts with this: |
The issue is with there not being a pre-built wheel for scipy v1.1.0. Or pip not picking it. This fails: This succeeds:
If we insist on installing the earlier version, we need to have C libraries needed to build the wheel installed - this worked for my env: Or, potentially, one one of the .whl here might be suitable - and pip is wrong for deciding it isn't - in which case one can download it manually. I didn't try that because it wouldn't be a reasonable fix to suggest. We can look into this further; changing As to install order: here's my educated guess at what's happening. Pip tries to follow the following:
We see two errors in the logs:
But that's okay because there's still the option of setup.py install . So the installation proceeds to step 2, installs numpy (this is what the somewhat ambiguous "Installing collected packages: numpy [...]" line says), attempts setup.py install of scipy because no wheel was built, and..
The only difference for 1.4.0 is that there is a pre-built wheel available. |
Amazing deep dive, thanks a ton @MashaNaslidnyk ! I agree that |
Maybe I'm paranoid; it's already dangerous enough to not require source-hash tagged requirements. Reading @MashaNaslidnyk 's post, it seems implicit that scipy 1.4.0 is close enough to 1.1.0 not to cause any problems, and that the pre-built wheel is the real solution to the installation issue. So it seems like an |
@ekalosak forgive me my ignorance, what is "source-hash tagged requirements"? |
I'm sure there's a better way to put that, sorry. Let me try to explain - hopefully the sources are more well written and illustrative if I fall short. We currently rely on version numbers maintained by humans to indicate which source code & pre-built wheels to install. This is dangerous for a number of reasons[1] - most relevantly because builds become nondeterministic. One specific example of the issue of nondeterministic builds is that supporting pre-built wheels can be introduced or removed without changing the semantic version tag. Having, hopefully, motivated the need for a better solution - one such solution is to add the SHA265 checksum (what I referred to as "hash") of the source code to the requirements.txt. This is a popular solution for deterministic builds in the Haskell, Debian, and production R communities - it's gaining steam in the Python community[2,3] as one of the patches in the patchwork-quilt solution to Dependency Hell in the Python ecosystem. It might be overkill here, but I bring it up to point out the risk of being free with dependency tagging - it might make issues like the present one worse rather than better going forward. Sources |
Is there any plan for the next release that will include a solution to this scipy dependency issue? As others commented, I have noticed the requirements file has been updated. That would be sufficient for my problem, were it to be released in a new version. I am working on a project that has dependencies on emukit and another package that both work with scipy, with package 2 requiring I have also just noticed that pyDOE is abandonware at this point, while a pyDOE2 fork is still being maintained. Would be nice to see if Emukit can make the swap. https://pypi.org/project/pyDOE2/ |
Regarding the dependency issue: the upcoming pip release, with its more stringent requirements resolver, is going to start refusing to install emukit when newer scipy versions are required elsewhere. Here is an example of the error message when installing with ERROR: Cannot install testpkg 0.2.0 and emukit 0.4.7 because these package versions have conflicting dependencies. The conflict is caused by: To fix this you could try to:
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies |
For those still experiencing pain, please try installing from source:
For those looking to develop emukit, substitute |
Looks like the recent Furthermore, with the switch to GitHub Actions, it'd be good to consider adding an issue requesting someone add CD -> PyPi. |
Yes, I shall release a new version, thanks for pinging @ekalosak . Can't promise any dates really, but will probably have time for that after 15th of Feb. |
Although to be fair scipy update won't solve all our problems. GPy isn't behaving of late either: SheffieldML/GPy#874 |
Update: i am going through recent PRs and issues at the moment, will release new version once I am done with that |
Version 0.4.8 is now available in pip. Install on python 3.8 seems to work locally. Can anyone in this issue please confirm before we close it? |
Install on python 3.9.1 works if wheel is installed. (GPy throws an error in case wheel is not installed, see issue mentioned above)
|
Thanks @johannesgiersdorf ! GPy is indeed broken on 3.9 at the moment, although relentless @ekalosak has a fix pending review: SheffieldML/GPy#888 |
Thanks to @ekalosak we now have new release of GPy, and Emukit was updated to work with it. Closing, |
An update here: I have just realized that while the dependency issue was fixed, it was never released, meaning people still could run into it. New version 0.4.9 was just released, and hopefully |
Hello,
I have a problem during the installation of emukit via pip.
I am using Python 3.8.3. I try to install the current version of emukit (0.4.7).
I've have tried to install it multiple times, if you want to see the details or you need more information to my setup I've created a more detailed gist. I have reproduced the bug as a sort of summary.
How to reproduce the bug
What I wanted to do: I tried to install emukit via pip with the command
pip install emukit
that is suggested by the README and the DocsFirst I create a virtual environment and activate it (I use venv because the first install attempt did not work out of the box, so I did not want to mess up my system and the python packaging tutorial suggested to do so)
Then I upgrade
pip
and installwheel
(because the output of pip in previous attempts suggested to do so)Then I try to install emukit via
pip
. For the bug report I loggedstdout
stderr
.The files containing the full output are attached.
error_install_f.txt
install_f.txt
The error occurs when pip is trying to install
scipy==1.1.0
(the fact that pip is trying to install exactly this version ofscipy
even if a newer is already installed even though emukit doesn't seem to depend on exactly this version I find odd).The whole error is a very long.
Errors similar to the above line led me to assume it could be related to scipy/scipy#11611
I have also tried to install
numpy
,gpy
andscipy
before installing emukit. For details see gist.Version of python, pip and gcc
I appreciate any and all help.
The text was updated successfully, but these errors were encountered: