-
Notifications
You must be signed in to change notification settings - Fork 1
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
[JOSS REVIEW] Install instructions #6
Comments
I didnt install GDAL from a wheel like instructed because I happen to know that rasterio/gdal will install on my machine through conda. It is the pip package that is breaking GDAL |
If a conda environment is created this way (with the package that has least chance of successful integration with the others, which is probably gdal)
At this point. all the dependencies are installed correctly. It is then the pip package I'll keep trying to make this work ... |
Progress! I have a working solution for my windows machine. Conda works best when you tell it upfront everything you're asking it to install, including all dependencies and pip dependencies. Therefore I recommend going the route of installing from a yml file. This yml file successfully installs the package and its dependencies . Paste the following into a file called
then, install using
That is successful, and also much easier to communicate however, when I
|
The fix is to change the first line of init.py in the installed package to
then ModuleNotFoundError: No module named 'pysal' luckily, conda has that: that install successfully. However, now I run into an issue with I'm going to give up troubleshooting for now until @npucino has a chance to take a look at all of this
|
Updated yml file to deal with the pysal dependency:
|
The pysal version is 2.5.0 |
Thanks @dbuscombe-usgs and sorry for the numerus issues you encountered during installation. I just tried the installation on a new Windows machine by following the guidelines I wrote in the
The So, I now:
Thanks for this! |
By the way, @dbuscombe-usgs can you explain me why being strict with packages versions during installation is not future-proof, assuming these packages versions will not be deleted from servers? Thanks! |
Hi @npucino, thanks, that sounds like an excellent plan! And yes I believe you are correct about the reason for the installation of the old sandpyper package. I will wait for your changes before attempting again with a fresh installation. I mentioned about the version numbers because conda probably wants to decide for itself about the versions that are compatible. As bugs are being fixed constantly, my personal philosophy would be to try to use the latest stable versions where possible. Additionally, I think if you want to be restrictive with package versions, you may want to specify a specific version for all packages, not just most ... |
Tagging our review thread: openjournals/joss-reviews#3666 (comment) |
Hi @dbuscombe-usgs & @npucino - aren't python packaging issues just fun to deal with 😑😅? Just to add another data point, I did manage to follow the instructions in the "Getting Started" section in the README, get the environment installed and the jupyter notebooks running (on Windows 10 x64). Still, I would recommend going with the approach @dbuscombe-usgs suggested #6 (comment) and creating a |
Installation instructions should be improved - as currently written, the instructions are not an optimal way to ensure success across different platforms and for relatively novice users who don't necessarily know the pitfalls with using pip and conda together in this way ...
and, I cannot get them to work, because the pip repository (why?) is packaged with dependencies that break the conda environment. In fact, the installation is a mess for a number of reasons:
the instructions don't mention what version of python to use, which is crucial. You should recommend a version that you know to work across multiple platforms. I am initially testing on Windows, so my python version will naturally be ahead of my Linux computer
installing some dependencies prior to installing the conda environment is a VERY bad idea because they'll install into the base environment, so won't be accessible to the sandpyper environment, and also would very likely break the base environment
You should consider providing a conda yml file
Further, you are being very restrictive with these versions (that are not compatible with my conda install and OS, for example)
conda install geopandas=0.8.2 matplotlib=3.3.4 numpy=1.20.1 pandas=1.2.2 tqdm=4.56.2 pysal=2.1 rasterio=1.2.0 richdem=0.3.4 scikit-image=0.18.1 scikit-learn=0.24.1 scipy=1.6.0 seaborn=0.11.1 tqdm=4.56.2 pooch=1.4.0 fuzzywuzzy
and that is bad way to 'future-proof' your installation (sorry, but you WILL be getting issues about this). Further, that's not a good way to use conda - conda is designed to tell YOU what versions YOU need, and the requirements.txt file would be the usual place to put really specific versions (for a pip install)
There is no need to install
richdem
and visual studio tools (thatmight require admin privileges). Conda will install vs build tools for you that for you if you DONT provide the specific version numbers. Andrichdem
is installed by conda, so that's a confusing instruction to install that separately. You can therefore remove that confusing step.the
jupyter
package should be installed with the rest, because of the very complex dependencies that might break conda with a posthoc installation. Also the package is calledjupyter
, notjupyter notebook
(that is the command you run afterwards)the pip packages
sandpyper
ships with versions of numpy, pandas, rasterio and matplotlib that either conflict with the conda environment, or should simply be installed with the conda environment. The pip installation also raises GDAL dependency errors. That should be in the conda environment!Conda and pip have very different purposes. I STRONGLY recommend you make a conda environment with all of the dependencies contained within. Its not at all clear to me why the package itself has to be a pip installation, but if you insist of that, it should ship with no additionally dependencies. At which point, there's no point making it a pip installation - you see my point? Its very confused.
I am therefore recommending the following approach, creating an environment with a specific python version
conda create --name sandpyper_env python=3.7
then installing ALL the dependencies inside it.
conda install geopandas matplotlib numpy pandas tqdm pysal rasterio richdem scikit-image scikit-learn scipy seaborn tqdm pooch fuzzywuzzy jupyter gdal
That approach a) was the only thing that worked for me, b) is superior for the reasons I describe above, and c) circumvents the need to install
richdem
and visual studio toolsTherefore the entire installation could be simply for following
conda config --add channels conda-forge
then
conda create --name sandpyper_env python=3.7
then
conda activate sandpyper
conda install geopandas matplotlib numpy pandas tqdm pysal rasterio richdem scikit-image scikit-learn scipy seaborn tqdm pooch fuzzywuzzy gdal
and finally
pip install sandpyper
(however, that results in GDAL dependency errors because pip/pypi is not appropriate here)
so, use pip/git
pip install git+https://github.com/npucino/sandpyper.git
that also gives GDAL errors
So, I cant install on windows. I cant review the code until I can install
I strongly recommend testing installation instructions on multiple machines before posting them
The text was updated successfully, but these errors were encountered: