insanum / sncli

Simplenote CLI
MIT License
396 stars 34 forks source link

Got the installation error. #77

Closed ZaxonXP closed 5 years ago

ZaxonXP commented 5 years ago

`sudo pip3 install sncli Requirement already satisfied (use --upgrade to upgrade): sncli in /usr/local/lib/python3.4/dist-packages/sncli-0.3.0-py3.4.egg Requirement already satisfied (use --upgrade to upgrade): urwid in /usr/local/lib/python3.4/dist-packages (from sncli) Requirement already satisfied (use --upgrade to upgrade): requests in /usr/lib/python3/dist-packages (from sncli) Downloading/unpacking Simperium3 (from sncli) Downloading Simperium3-0.1.3.tar.gz Running setup.py (path:/tmp/pip-build-m94x3hn6/Simperium3/setup.py) egg_info for package Simperium3 /usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires' warnings.warn(msg) /usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) error in Simperium3 setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers Complete output from command python setup.py egg_info: /usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires'

warnings.warn(msg)

/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'long_description_content_type'

warnings.warn(msg)

error in Simperium3 setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers


Cleaning up... Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-m94x3hn6/Simperium3 Storing debug log for failure in /root/.pip/pip.log`

Any ideas what went wrong and how to fix it?

Regards,

samuelallan72 commented 5 years ago

Thanks for the report. This appears to be a bug in the setup.py for simperium3.

samuelallan72 commented 5 years ago

@ZaxonXP can you let us know which version of python, pip, and setuptools you are using? It appears that for at least one of the issues above is caused by an old version of setuptools.

ZaxonXP commented 5 years ago

pip --version pip 1.5.6 from /usr/lib/python3/dist-packages (python 3.4)

python --version Python 2.7.9

pip show setuptools Name: setuptools Version: 5.5.1 Location: /usr/lib/python3/dist-packages Requires:

samuelallan72 commented 5 years ago

That's strange... pip is reporting it's running on python3, but the default python is version 2... hmm.

I think the real problem is setuptools though. Version 5.5.1 was released in 2014. Are you able to upgrade that?

ZaxonXP commented 5 years ago

When I use pip command to upgrade setuptools, then 5.5.1 is the latest available:

sudo pip install setuptools --upgrade [sudo] password for user: Downloading/unpacking setuptools from https://files.pythonhosted.org/packages/e7/16/da8cb8046149d50940c6110310983abb359bbb8cbc3539e6bef95c29428a/setuptools-40.6.2-py2.py3-none-any.whl#sha256=88ee6bcd5decec9bd902252e02e641851d785c6e5e75677d2744a9d13fed0b0a Downloading setuptools-40.6.2-py2.py3-none-any.whl (573kB): 573kB downloaded Installing collected packages: setuptools Found existing installation: setuptools 5.5.1 Not uninstalling setuptools at /usr/lib/python3/dist-packages, owned by OS Successfully installed setuptools Cleaning up... Is there another way that I can do the upgrade to the latest version? (I am on Debian 8.11 Jessie).

samuelallan72 commented 5 years ago

Ah I see what is happening. You shouldn't use sudo with pip install. Rather use the OS package manager to install system wide packages or use pip install --user ... to install python packages locally for your user. Pip is refusing to upgrade setuptools because it recognizes that the OS owns the system-wide version.

You could try either using a virtual environment (python -m venv venvname && source venvname/bin/activate) and then install/upgrade setuptools and sncli inside that; or see if pip install --user --upgrade setuptools will upgrade setuptools locally for your user and override the version installed in the system.

ZaxonXP commented 5 years ago
pip install --user --upgrade setuptools
Downloading/unpacking setuptools from https://files.pythonhosted.org/packages/e7/16/da8cb8046149d50940c6110310983abb359bbb8cbc3539e6bef95c29428a/setuptools-40.6.2-py2.py3-none-any.whl#sha256=88ee6bcd5decec9bd902252e02e641851d785c6e5e75677d2744a9d13fed0b0a
  Downloading setuptools-40.6.2-py2.py3-none-any.whl (573kB): 573kB downloaded
Installing collected packages: setuptools
Successfully installed setuptools
Cleaning up...

and then

pip install sncli --user --upgrade
Downloading/unpacking sncli
  Downloading sncli-0.3.0.tar.gz
  Running setup.py (path:/tmp/pip-build-c8_3ycj8/sncli/setup.py) egg_info for package sncli

Requirement already up-to-date: urwid in /usr/local/lib/python3.4/dist-packages (from sncli)
Downloading/unpacking requests from https://files.pythonhosted.org/packages/ff/17/5cbb026005115301a8fb2f9b0e3e8d32313142fe8b617070e7baad20554f/requests-2.20.1-py2.py3-none-any.whl#sha256=65b3a120e4329e33c9889db89c80976c5272f56ea92d3e74da8a463992e3ff54 (from sncli)
  Downloading requests-2.20.1-py2.py3-none-any.whl (57kB): 57kB downloaded
Downloading/unpacking Simperium3 (from sncli)
  Downloading Simperium3-0.1.3.tar.gz
  Running setup.py (path:/tmp/pip-build-c8_3ycj8/Simperium3/setup.py) egg_info for package Simperium3
    /usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires'
      warnings.warn(msg)
    /usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'long_description_content_type'
      warnings.warn(msg)
    error in Simperium3 setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers
    Complete output from command python setup.py egg_info:
    /usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires'

  warnings.warn(msg)

/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'long_description_content_type'

  warnings.warn(msg)

error in Simperium3 setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-c8_3ycj8/Simperium3
Storing debug log for failure in /home/user/.pip/pip.log

So maybe there is a way to clean the mess I did using sudo and install it a proper way under local user. How can I do this?

samuelallan72 commented 5 years ago

Not sure sorry. Could you try installing in a virtual environment? The following commands should do it:

python3.4 -m venv TMPVENV
source TMPVENV/bin/activate
pip install --upgrade setuptools
pip install sncli
ZaxonXP commented 5 years ago
 python3.4 -m venv TMPVENV
Error: Command '['/home/user/zzz/sncli/TMPVENV/bin/python3.4', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1
samuelallan72 commented 5 years ago

:cry: I have no ideas what's going on there sorry... You may have to try a different way of obtaining a virtualenv.

ZaxonXP commented 5 years ago

OK. I managed somehow to install it on one machine with Debian Stretch. Now I have one more reason to upgrade my other machine from Jessie to Stretch. :)

Thanks for helping!

samuelallan72 commented 5 years ago

No worries. Sorry it didn't work for you on your Jessie machine.