stability-sdk icon indicating copy to clipboard operation
stability-sdk copied to clipboard

Having trouble installing and running SDK on server

Open alexbudin opened this issue 3 years ago • 1 comments

Hi guys,

I have installed the SDK with pip install stability-sdk which was done succesfully:

Running the command again seems to show that everything is ok:

pip install stability-sdk
Requirement already satisfied: stability-sdk in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied: python-magic in /usr/local/lib/python2.7/dist-packages (from stability-sdk)
Requirement already satisfied: grpcio-tools in /usr/local/lib/python2.7/dist-packages (from stability-sdk)
Requirement already satisfied: python-dotenv in /usr/local/lib/python2.7/dist-packages (from stability-sdk)
Requirement already satisfied: Pillow in /usr/local/lib/python2.7/dist-packages (from stability-sdk)
Requirement already satisfied: grpcio in /usr/local/lib/python2.7/dist-packages (from stability-sdk)
Requirement already satisfied: setuptools in /usr/lib/python2.7/dist-packages (from grpcio-tools->stability-sdk)
Requirement already satisfied: protobuf<4.0dev,>=3.5.0.post1 in /usr/local/lib/python2.7/dist-packages (from grpcio-tools->stability-sdk)
Requirement already satisfied: typing; python_version < "3.5" in /usr/local/lib/python2.7/dist-packages (from python-dotenv->stability-sdk)
Requirement already satisfied: enum34>=1.0.4; python_version < "3.4" in /usr/lib/python2.7/dist-packages (from grpcio->stability-sdk)
Requirement already satisfied: six>=1.5.2 in /usr/lib/python2.7/dist-packages (from grpcio->stability-sdk)
Requirement already satisfied: futures>=2.2.0; python_version < "3.2" in /usr/local/lib/python2.7/dist-packages (from grpcio->stability-sdk)

I then created a file called execute.py and copied the code from the google collab script and tried executing it with python execute.py

At first it threw an error:

python execute.py
Enter your API Key
Traceback (most recent call last):
  File "execute.py", line 12, in <module>
    from IPython.display import display
ImportError: No module named IPython.display

I then installed ipython with pip install ipython

Now when i execute python execute.py

Enter your API Key
Traceback (most recent call last):
  File "execute.py", line 14, in <module>
    from stability_sdk import client
  File "/usr/local/lib/python2.7/dist-packages/stability_sdk/client.py", line 30
    algorithms: Dict[str, int] = {
              ^
SyntaxError: invalid syntax

I would rather use the SDK directly from a command line, but your instructions on github are very vague, you say to install the package with PIP then you run commands on a file called client.py with PIP3 but there is no client.py, only if you pull the repo and go to src....its very confusing.

Can you guys please help?

Thank you,

Alex

alexbudin avatar Aug 26 '22 07:08 alexbudin

Managed to make it work and i would love to maybe write step by step instructions for people that are maybe trying this themselves and dont know how to make it work. Would that be possible?

alexbudin avatar Aug 26 '22 09:08 alexbudin

@alexbudin would love it if you wanted to improve our documentation! The normal method I'd recommend for contributing to an open source project like this one would be to submit it as a "pull request". If you've never done this before and aren't interested in using this as a learning exercise, you could also post your documentation suggestions here and we can evaluate what to do with the suggestions from there.

dmarx avatar Aug 29 '22 00:08 dmarx