jobin-sun / raspberry-gpio-python

Automatically exported from code.google.com/p/raspberry-gpio-python
MIT License
0 stars 0 forks source link

pip install fails in Arch ARM, with python3 #48

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1. Download latest arch arm installation, install python and pip
2. pip install RPi.GPIO
3. the install fails, and the logs tell me that there is an error with 
distribute

Below is the error. I attached the full log to this issue as well. It seems to 
be similar to the problem seen here: 
https://bitbucket.org/schettino72/doit/issue/54/doit-won-t-install-under-python-
332

error: invalid command 'bdist_egg'

/root/.virtualenvs/networks/build/RPi.GPIO/distribute-0.6.21-py3.3.egg

Traceback (most recent call last):

  File "./distribute_setup.py", line 143, in use_setuptools

    raise ImportError

ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

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

  File "/root/.virtualenvs/networks/build/RPi.GPIO/setup.py", line 3, in <module>

    distribute_setup.use_setuptools()

  File "./distribute_setup.py", line 145, in use_setuptools

    return _do_download(version, download_base, to_dir, download_delay)

  File "./distribute_setup.py", line 125, in _do_download

    _build_egg(egg, tarball, to_dir)

  File "./distribute_setup.py", line 116, in _build_egg

    raise IOError('Could not build the egg.')

OSError: Could not build the egg.

Original issue reported on code.google.com by iamcypr...@gmail.com on 6 Sep 2013 at 4:01

Attachments:

GoogleCodeExporter commented 9 years ago
I thought I'd already removed distribute as part of 0.5.3a!  Will try to 
reproduce.

Original comment by btcros...@googlemail.com on 6 Sep 2013 at 7:06

GoogleCodeExporter commented 9 years ago
The problem is as a side effect of pip - it install non-alpha releases by 
default.  In other words, it is trying to install version 0.2.0, which is 
ancient.  Version 0.2.0 uses an old problematic version of distribute, hence 
the error you were getting.  As all recent version of RPi.GPIO are alpha, you 
have to use the --pre flag with pip to install them.

To successfully install the latest version of RPi.GPIO, I had to:

Fresh install of Arch
# pacman -S python
# pacman -S python-pip
# pacman -S gcc
# pip install RPi.GPIO --pre

I need to do the next release without the 'a' to fully fix this issue.  It is 
mature enough not to be considered alpha any more!

Original comment by btcros...@googlemail.com on 8 Sep 2013 at 8:12