Closed tpanza closed 4 years ago
Hi @tpanza ,
Sorry about the complications there. I'm looking into this. For now, this is how Sherpa is being installed on the Travis virtual machine which should work.
git clone --depth=50 --branch=master https://github.com/sherpa-ai/sherpa.git sherpa-ai/sherpa
cd sherpa-ai/sherpa
pip install -r requirements.txt
pip install .
I know this is using GitHub, but it does work in a fully automatic manner.
I am far from a guru when it comes to Python packaging, but I think there are two issues:
GPyOpt
to the REQUIRED
list.import sherpa
. This is used to get the ground truth of what the __version__
is. However, the __init__.py
is in turn attempting to import packages that may not yet be installed (because they are dependencies that setup.py may need to install). Some alternative approaches are listed here. The problem we are having here is the warning under number 6 on that list:Although this technique is common, beware that it will fail if
sample/__init__.py
imports packages frominstall_requires
dependencies, which will very likely not be installed yet whensetup.py
is run.
Hehe it seems like you're more of a guru than me. What you're saying totally makes sense.
I had not added GPyOpt to the required list at some point because I thought to keep it as an optional dependency but at this point it is probably most sensible to include it..
When I run this on Linux command line from an activated conda environment:
I get this error:
So I then manually installed
pymongo
and tried again. I then received this error:Further, after I manually installed the
scikit-learn
package, I got another similar error, this time forGPyOpt
.So I then had to manually run
pip install GPyOpt
.After that, I was then able to successfully run
pip install parameter-sherpa
. In this case, some other dependencies actually were successfully resolved:So it looks like these dependencies were not able to be resolved when installing via pip:
But these dependencies could be resolved when installing via pip:
Lastly, these dependencies are "unknown" as to whether they will be resolved, since my environment happened to already have them:
I realize that the pip installation docs say:
However, I would like to quickly and easily deploy this to an easily replicatable environment via the pip package manager, and installing via GitHub is not practical.
Is there any way that you could please look into this? (and, of course, the fix would need to be published back to the PyPI)