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

st2client missing python dependencies #3367

Closed
jwomack opened this issue Apr 19, 2017 · 12 comments
Closed

st2client missing python dependencies #3367

jwomack opened this issue Apr 19, 2017 · 12 comments

Comments

@jwomack
Copy link

jwomack commented Apr 19, 2017

I needed to go through stack traces to find the following dependencies:
pytz
editor
jsonschema
prompt_toolkit

Fixed by:
sudo pip install pytz
sudo pip install editor
sudo pip install jsonschema
sudo pip install prompt_toolkit

@LindsayHill
Copy link
Contributor

How did you install st2client? Some of those dependencies - e.g. pytz - are covered in https://github.com/StackStorm/st2/blob/master/st2client/requirements.txt

@cyberious
Copy link

cyberious commented May 4, 2017

I too am unable to get st2client installed, have tried both Python 2.7 or Python 3.6 using pip install and falling down a rabbit whole of dependency. Installing a OS X.

Traceback (most recent call last):
  File "/usr/local/bin/st2", line 7, in <module>
    from st2client.shell import main
  File "/usr/local/lib/python2.7/site-packages/st2client/shell.py", line 39, in <module>
    from st2client.commands import pack
  File "/usr/local/lib/python2.7/site-packages/st2client/commands/pack.py", line 18, in <module>
    import editor
ImportError: No module named editor

Finally got working after manually running sudo pip install python-editoras well as the above

@enykeev
Copy link
Member

enykeev commented May 4, 2017

The dependency is there though. I would also like to know how you're installing st2client, it might that we missed something during, say, packaging....

@cyberious
Copy link

Just using pip install st2client

@cognifloyd
Copy link
Member

cognifloyd commented May 22, 2017

The problem occurs when installing via pypi (system or user):
pip install st2client [--user]

The reason is that the requirements in st2client/setup.py do not match with st2client/requirements.txt.

It looks like all of the changes to requirements.txt did not make it into setup.py since Jan 25, 2016, commit de65841. The following are in requirements.txt, but not setup.py (and the commit they were added in).

These version requirements don't match (requirements.txt vs setup.py):

  • requests[security]<2.12,>=2.11.1 vs requests<3.0,>=2.7.0 (changed in commit 8049af6)

@cognifloyd
Copy link
Member

To avoid setup.py and requirements.txt getting out of sync, requirements.txt could be replaced with something simpler, as described here: https://caremad.io/posts/2013/07/setup-vs-requirement/

Would that be acceptable? If not, what's st2's preferred method for keeping requirements.txt and setup.py in sync?

@j3p0uk
Copy link
Contributor

j3p0uk commented May 14, 2018

This is still an issue, the package on pypi needs the following installed before it is usable:

pip install argcomplete pytz jsonschema prompt_toolkit python-editor

@Kami
Copy link
Member

Kami commented May 14, 2018

@j3p0uk Thanks for reporting.

I need to check, because we did update setup.py in the past, but it's possible it's still out of sync.

@jjm
Copy link
Member

jjm commented Jul 3, 2018

I can confirm this is still an issue, I setup a virtualenv on MacOS using pipenv and had to install the packages listed above.

st2 2.7.2, on Python 2.7

@Kami
Copy link
Member

Kami commented Jul 3, 2018

@jjm I believe #4209 should solve that (I will verify it now).

It's targeted for v2.8.1 / v2.9.0 release.

@Kami
Copy link
Member

Kami commented Jul 3, 2018

@jjm I confirmed that changes in #4209 indeed fix this issue by running the following command in a fresh virtual environment:

pip install -e "git+https://github.com/stackstorm/st2.git@setup_reqs#egg=st2client&subdirectory=st2client"

@jjm
Copy link
Member

jjm commented Jul 3, 2018

@Kami Cool. Thank you very much 👍

@Kami Kami closed this as completed in #4209 Jul 9, 2018
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

8 participants