Skip to content
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

suds-jurko and setuptools 58 conflict with pip install #212

Closed
emiliom opened this issue Sep 27, 2021 · 8 comments
Closed

suds-jurko and setuptools 58 conflict with pip install #212

emiliom opened this issue Sep 27, 2021 · 8 comments

Comments

@emiliom
Copy link
Contributor

emiliom commented Sep 27, 2021

From snowex-hackweek/docker-image#29 (comment):

running into an issue with ulmo dependency suds-jurko andersinno/suds-jurko#6 , workaround seems to be pinning setuptools<58

@KehanGit
Copy link

KehanGit commented Apr 8, 2022

Any updates on this conflict? I am running into the same problem.

@emiliom
Copy link
Contributor Author

emiliom commented May 15, 2022

From @KehanGit , from another exchange:

I am trying to use it for the SNOTEL data analysis and installed in successfully but when I tried to import the package, it has an error as shown below.

image

@KehanGit could you specify how you installed ulmo, what version of ulmo was installed, and what suds library (I assume it was suds-jurko) and version was installed?

For reference, #189 is somewhat related to this issue.

@emiliom
Copy link
Contributor Author

emiliom commented May 15, 2022

I installed ulmo just now, like this:

mamba create -n ulmo_test -c conda-forge python==3.8 ulmo ipykernel

Then I was able to import ulmo without problems.

FYI, I'm on Ubuntu Linux; I pinned Python to 3.8 b/c that's what I see in your error report; I added ipykernel just to be able to test in IPython; and I used mamba rather than conda to get to a successful conda environment more quickly.

@KehanGit
Copy link

KehanGit commented May 16, 2022 via email

@emiliom
Copy link
Contributor Author

emiliom commented May 17, 2022

Thanks for the information. I've created a conda environment where I then installed ulmo via pip install ulmo. I then ran into an error when trying to do import ulmo, though the error was different from yours.

What version of ulmo was installed? I don't remember how to find the version in an environment that's not conda, if import ulmo fails! Can someone in your group help you get at that? What I found with my test with pip install is that it ended up falling back to a really, really old version of ulmo, 0.5.0! The initial errors start during pip install while installing suds-jurko. It ends up failing to install suds-jurko altogether and instead installs its much older predecessor, suds.

Do you use conda? From what I can tell, that would solve the problem and let you use ulmo w/o problems. That doesn't address the real problem with installation via pip install; I'd like to look into it later.

For future reference, here's the first error reported during pip install ulmo on the fist attempt to install suds-jurko:

Collecting suds-jurko
  Downloading suds-jurko-0.6.zip (255 kB)
     |████████████████████████████████| 255 kB 35.2 MB/s 
    ERROR: Command errored out with exit status 1:
     command: /home/mayorga/miniconda3/envs/ulmo_pip/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ka62o_x0/suds-jurko_c386975ba86b41c6b0dc93e03c4d7a56/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ka62o_x0/suds-jurko_c386975ba86b41c6b0dc93e03c4d7a56/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-9kizjuhl
         cwd: /tmp/pip-install-ka62o_x0/suds-jurko_c386975ba86b41c6b0dc93e03c4d7a56/
    Complete output (1 lines):
    error in suds-jurko setup command: use_2to3 is invalid.
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/d0/88/f3bed9b494e0dae26bd55e5f3d527b8244208125024727267e8109956a11/suds-jurko-0.6.zip#sha256=1cb7252cb13018fc32887c3a834ed7c6648a5b5c4c159be5806da2e1785399e8 (from https://pypi.org/simple/suds-jurko/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

The installer keeps trying with older versions of suds-jurko, then gives up and tries older and older versions of ulmo until it finds one that can install using the predecessor of suds-jurko, suds.

@emiliom
Copy link
Contributor Author

emiliom commented May 19, 2022

I went back and tried the recommendation at the start of this issue: pinning setuptools to <58 when installing ulmo via pip install. That worked! import ulmo no longer leads to an error.

@emiliom emiliom changed the title suds-jurko and setuptools 58 conflict suds-jurko and setuptools 58 conflict with pip install Dec 1, 2022
@jayqi
Copy link

jayqi commented Nov 2, 2023

I've got a simple workaround for the setuptools + suds-jurko issue that folks may find helpful.

What I've done is pre-build a wheel (using the older version of setuptools) and made that available on GitHub: https://github.com/drivendataorg/suds-jurko-wheel

You can then either install the wheel distributed on that repository first or side-by-side with ulmo and it will install with no problems.

For example:

pip install ulmo "suds-jurko @ https://github.com/drivendataorg/suds-jurko-wheel/releases/download/v0.6/suds_jurko-0.6-py3-none-any.whl"

or in a requirements.txt

suds-jurko @ https://github.com/drivendataorg/suds-jurko-wheel/releases/download/v0.6/suds_jurko-0.6-py3-none-any.whl
ulmo

The wheel is redistributing suds-jurko without modification. The build process happens in GitHub CI transparently, and the build script is here.

This way you don't need to fuss with setuptools or don't need to be forced to use conda.

@emiliom
Copy link
Contributor Author

emiliom commented Nov 5, 2023

Thank you @jayqi !! To make it simpler for future users who run into this problem, I'll close this issue and leave #215 open (it has a more unambiguous title than this one); that's the other issue where you commented on your solution.

@emiliom emiliom closed this as completed Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants