niolabs / python-xbee

Python tools for working with XBee radios
MIT License
101 stars 45 forks source link

installing python-xbee is throwing an error with Python 2.7 #66

Closed heckj closed 6 years ago

heckj commented 6 years ago

Doing a fresh install:

pip install xbee:

Downloading/unpacking xbee
Downloading XBee-2.3.2.tar.gz
Running setup.py (path:/home/vagrant/src/Collector/.rt-Linux-x86_64/build/xbee/setup.py) egg_info for package xbee
  error in XBee setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
  Complete output from command python setup.py egg_info:
  error in XBee setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.

A recent commit adjusted the setup.extras_requires: https://github.com/niolabs/python-xbee/commit/450303178f29f05b8f9fec0dc6c4576e8e7961c8#diff-2eeaed663bd0d25b7e608891384b7298, which I believe introduced this issue.

Installing version 2.3.1 of this module doesn't exhibit this issue: pip install xbee==2.3.1

bp1222 commented 6 years ago

Hi @heckj, the reason I pinned to tornado 4.5, was that 5.x changes a bunch of signatures and I haven't tested against it yet. Although a quick glance, and we're not susceptible to the big change (passing the ioloop as a kwarg).

However, I've tried in environments using pip9, and 10, with and without the wheel package installed, clearing out the caches. Would you be able to provide more details on your environment so I can better replicate what you're seeing?

heckj commented 6 years ago

Happy to - if I've done something completely awry, please let me know -

I was installing a virtualenv on Ubuntu 14.04 (Trusty), and the code was primarily Python 2.7 oriented. The simplest reproduction:

vagrant@vagrant-ubuntu-trusty-64:~/src/Collector$ virtualenv .venv
New python executable in .venv/bin/python
Installing setuptools, pip...done.
vagrant@vagrant-ubuntu-trusty-64:~/src/Collector$ source .venv/bin/activate
(.venv)vagrant@vagrant-ubuntu-trusty-64:~/src/Collector$ pip install xbee
Downloading/unpacking xbee
  Downloading XBee-2.3.2.tar.gz
  Running setup.py (path:/home/vagrant/src/Collector/.venv/build/xbee/setup.py) egg_info for package xbee
    error in XBee setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
    Complete output from command python setup.py egg_info:
    error in XBee setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /home/vagrant/src/Collector/.venv/build/xbee
Storing debug log for failure in /home/vagrant/.pip/pip.log

I grabbed that pip.log and tossed it into a gist in case that's useful as well: https://gist.github.com/heckj/8912c963c66ab12b6bb21dd7947399e6

bp1222 commented 6 years ago

can you drop in the output of a pip list as well, so I can duplicate the versioning too.

heckj commented 6 years ago

pip list:

argparse (1.2.1)
pip (1.5.4)
setuptools (2.2)
wsgiref (0.1.2)
bp1222 commented 6 years ago

It seems the versions that ship with 14.04 LTS are quite out of date. Support for tilde-versions came in versions of pip and setuptools just after what shipped with LTS. Updating these to at least pip 6.0, and setuptools 8.0 will rectify the problem. I confirmed that updating to at least those, or even more current versions, will rectify the problem. Let me know if this fixes your installation.

heckj commented 6 years ago

thanks @bp1222 - upgrading both pip and setuptools has indeed resolved this:

pip install --upgrade pip
pip install setuptools>=8.0

and then pip install xbee where it resolved to 2.3.2 and installed correctly worked just fine.