0

Unable to install Adafruit-IO on Pi3
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Unable to install Adafruit-IO on Pi3

by sdb614 on Wed Oct 31, 2018 7:36 pm

I get the error below when I try installing the Adafruit IO package on my Raspberry Pi 3. All the other packages installed just fine. I did all the previous steps successfully including apt-get update and apt-get upgrade. I'm a complete novice just blindly following instructions from here https://learn.adafruit.com/adafruit-io-basics-digital-output/python-setup and have barely used the Pi so I don't know how I could have messed that up.

What am I doing wrong?

Here is some more info on my device:

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

Code: Select all | TOGGLE FULL SIZE
pi@raspberrypi:~ $ sudo pip3 install adafruit-io
Downloading/unpacking adafruit-io
  Downloading adafruit-io-2.0.17.tar.gz (41kB): 41kB downloaded
  Running setup.py (path:/tmp/pip-build-3j6sk77s/adafruit-io/setup.py) egg_info for package adafruit-io
    version:  2.0.17
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip-build-3j6sk77s/adafruit-io/setup.py", line 68, in <module>
        classifiers      = classifiers
      File "/usr/local/lib/python3.4/dist-packages/setuptools/__init__.py", line 140, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "<string>", line 14, in replacement_run
      File "/usr/local/lib/python3.4/dist-packages/setuptools/command/egg_info.py", line 614, in write_pkg_info
        metadata.write_pkg_info(cmd.egg_info)
      File "/usr/lib/python3.4/distutils/dist.py", line 1108, in write_pkg_info
        self.write_pkg_file(pkg_info)
      File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 91, in write_pkg_file
        long_desc = rfc822_escape(self.get_long_description())
      File "/usr/lib/python3.4/distutils/util.py", line 470, in rfc822_escape
        lines = header.split('\n')
    TypeError: Type str doesn't support the buffer API
    Complete output from command python setup.py egg_info:
    version:  2.0.17

running egg_info

creating pip-egg-info/adafruit_io.egg-info

writing pip-egg-info/adafruit_io.egg-info/PKG-INFO

Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip-build-3j6sk77s/adafruit-io/setup.py", line 68, in <module>

    classifiers      = classifiers

  File "/usr/local/lib/python3.4/dist-packages/setuptools/__init__.py", line 140, in setup

    return distutils.core.setup(**attrs)

  File "/usr/lib/python3.4/distutils/core.py", line 148, in setup

    dist.run_commands()

  File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands

    self.run_command(cmd)

  File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command

    cmd_obj.run()

  File "<string>", line 14, in replacement_run

  File "/usr/local/lib/python3.4/dist-packages/setuptools/command/egg_info.py", line 614, in write_pkg_info

    metadata.write_pkg_info(cmd.egg_info)

  File "/usr/lib/python3.4/distutils/dist.py", line 1108, in write_pkg_info

    self.write_pkg_file(pkg_info)

  File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 91, in write_pkg_file

    long_desc = rfc822_escape(self.get_long_description())

  File "/usr/lib/python3.4/distutils/util.py", line 470, in rfc822_escape

    lines = header.split('\n')

TypeError: Type str doesn't support the buffer API

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-3j6sk77s/adafruit-io
Storing debug log for failure in /root/.pip/pip.log


I tried installing a different way.

Code: Select all | TOGGLE FULL SIZE
pi@raspberrypi:~/io-client-python $ sudo python3 setup.py install
version:  2.0.17
running install
running bdist_egg
running egg_info
writing top-level names to adafruit_io.egg-info/top_level.txt
writing adafruit_io.egg-info/PKG-INFO
Traceback (most recent call last):
  File "setup.py", line 68, in <module>
    classifiers      = classifiers
  File "/usr/local/lib/python3.4/dist-packages/setuptools/__init__.py", line 140, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python3.4/dist-packages/setuptools/command/install.py", line 67, in run
    self.do_egg_install()
  File "/usr/local/lib/python3.4/dist-packages/setuptools/command/install.py", line 109, in do_egg_install
    self.run_command('bdist_egg')
  File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python3.4/dist-packages/setuptools/command/bdist_egg.py", line 163, in run
    self.run_command("egg_info")
  File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python3.4/dist-packages/setuptools/command/egg_info.py", line 289, in run
    writer(self, ep.name, os.path.join(self.egg_info, ep.name))
  File "/usr/local/lib/python3.4/dist-packages/setuptools/command/egg_info.py", line 614, in write_pkg_info
    metadata.write_pkg_info(cmd.egg_info)
  File "/usr/lib/python3.4/distutils/dist.py", line 1108, in write_pkg_info
    self.write_pkg_file(pkg_info)
  File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 91, in write_pkg_file
    long_desc = rfc822_escape(self.get_long_description())
  File "/usr/lib/python3.4/distutils/util.py", line 470, in rfc822_escape
    lines = header.split('\n')
TypeError: Type str doesn't support the buffer API








When I just run setup.py without "install" after, it gives me this:

Code: Select all | TOGGLE FULL SIZE
pi@raspberrypi:~/io-client-python $ python3 setup.py
version:  2.0.17
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: no commands supplied


Why is this giving an error? Thanks.

sdb614
 
Posts: 4
Joined: Tue Oct 30, 2018 7:17 pm

Re: Unable to install Adafruit-IO on Pi3

by adafruit2 on Mon Nov 05, 2018 11:30 pm

what OS/version are you running? it may matter!

adafruit2
Site Admin
 
Posts: 17783
Joined: Fri Mar 11, 2005 7:36 pm

Re: Unable to install Adafruit-IO on Pi3

by sdb614 on Tue Nov 06, 2018 9:16 am

I am running Raspbian Version 8 on a Raspberry Pi 3 Model B. Is this out-of-date?

Here are the details:

Code: Select all | TOGGLE FULL SIZE
pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

sdb614
 
Posts: 4
Joined: Tue Oct 30, 2018 7:17 pm

Re: Unable to install Adafruit-IO on Pi3

by brubell on Tue Nov 06, 2018 10:04 am

Could you try updating setuptools:
Code: Select all | TOGGLE FULL SIZE
easy_install -U setuptools
or
Code: Select all | TOGGLE FULL SIZE
pip3 install setuptools --upgrade


Then, try re-running the installer:
Code: Select all | TOGGLE FULL SIZE
sudo pip3 install adafruit-io

brubell
 
Posts: 189
Joined: Fri Jul 17, 2015 10:33 pm

Re: Unable to install Adafruit-IO on Pi3

by sdb614 on Tue Nov 06, 2018 7:33 pm

Unfortunately, neither work. Setuptools is already installed.

Code: Select all | TOGGLE FULL SIZE
pi@raspberrypi:~ $ sudo pip3 install setuptools --upgrade
Requirement already up-to-date: setuptools in /usr/local/lib/python3.4/dist-packages
Cleaning up...


When I try installing adafruit-io again:

Code: Select all | TOGGLE FULL SIZE
pi@raspberrypi:~ $ sudo pip3 install adafruit-io
Downloading/unpacking adafruit-io
  Downloading adafruit-io-2.0.17.tar.gz (41kB): 41kB downloaded
  Running setup.py (path:/tmp/pip-build-zt16aeux/adafruit-io/setup.py) egg_info for package adafruit-io
    version:  2.0.17
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip-build-zt16aeux/adafruit-io/setup.py", line 68, in <module>
        classifiers      = classifiers
      File "/usr/local/lib/python3.4/dist-packages/setuptools/__init__.py", line 140, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "<string>", line 14, in replacement_run
      File "/usr/local/lib/python3.4/dist-packages/setuptools/command/egg_info.py", line 614, in write_pkg_info
        metadata.write_pkg_info(cmd.egg_info)
      File "/usr/lib/python3.4/distutils/dist.py", line 1108, in write_pkg_info
        self.write_pkg_file(pkg_info)
      File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 91, in write_pkg_file
        long_desc = rfc822_escape(self.get_long_description())
      File "/usr/lib/python3.4/distutils/util.py", line 470, in rfc822_escape
        lines = header.split('\n')
    TypeError: Type str doesn't support the buffer API
    Complete output from command python setup.py egg_info:
    version:  2.0.17

running egg_info

creating pip-egg-info/adafruit_io.egg-info

writing requirements to pip-egg-info/adafruit_io.egg-info/requires.txt

writing pip-egg-info/adafruit_io.egg-info/PKG-INFO

Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip-build-zt16aeux/adafruit-io/setup.py", line 68, in <module>

    classifiers      = classifiers

  File "/usr/local/lib/python3.4/dist-packages/setuptools/__init__.py", line 140, in setup

    return distutils.core.setup(**attrs)

  File "/usr/lib/python3.4/distutils/core.py", line 148, in setup

    dist.run_commands()

  File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands

    self.run_command(cmd)

  File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command

    cmd_obj.run()

  File "<string>", line 14, in replacement_run

  File "/usr/local/lib/python3.4/dist-packages/setuptools/command/egg_info.py", line 614, in write_pkg_info

    metadata.write_pkg_info(cmd.egg_info)

  File "/usr/lib/python3.4/distutils/dist.py", line 1108, in write_pkg_info

    self.write_pkg_file(pkg_info)

  File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 91, in write_pkg_file

    long_desc = rfc822_escape(self.get_long_description())

  File "/usr/lib/python3.4/distutils/util.py", line 470, in rfc822_escape

    lines = header.split('\n')

TypeError: Type str doesn't support the buffer API

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

sdb614
 
Posts: 4
Joined: Tue Oct 30, 2018 7:17 pm

Re: Unable to install Adafruit-IO on Pi3

by brubell on Thu Nov 08, 2018 10:45 am

Could you try updating your Python installation to 3.5? I've been attempting to replicate this on my end using your setup without success.

brubell
 
Posts: 189
Joined: Fri Jul 17, 2015 10:33 pm

Re: Unable to install Adafruit-IO on Pi3

by sdb614 on Thu Nov 08, 2018 7:42 pm

I'm running Python 3.4. I'm finding a lot of different ways of updating Python. Can you post a link that is your preferred method? Does it need to be 3.5 or can it be something even later?

Python 3.5 comes with Raspbian Stretch right? I'm running Jessie. I can update by installing Stretch?

sdb614
 
Posts: 4
Joined: Tue Oct 30, 2018 7:17 pm

Re: Unable to install Adafruit-IO on Pi3

by adafruit2 on Thu Nov 08, 2018 11:04 pm

yeah you should really update/upgrade!

adafruit2
Site Admin
 
Posts: 17783
Joined: Fri Mar 11, 2005 7:36 pm

Please be positive and constructive with your questions and comments.