Python

在 Raspberry Pi 上安裝 pyethapp 失敗

  • January 22, 2022

我正在嘗試在 Raspberry PI B+ 上安裝 pyethapp

sudo pip install pyethapp出錯

Complete output from command python setup.py egg_info:
Couldn't find index page for 'pytest-runner' (maybe misspelled?)
No local packages or download links found for pytest-runner>2.0,<3
Traceback (most recent call last):
 File "<string>", line 1, in <module>
 File "/tmp/pip-build-U_2TGJ/devp2p/setup.py", line 56, in <module>
   tests_require=test_requirements
 File "/usr/lib/python2.7/distutils/core.py", line 112, in setup
   _setup_distribution = dist = klass(attrs)
 File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 221, in __init__
   self.fetch_build_eggs(attrs.pop('setup_requires'))
 File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 245, in fetch_build_eggs
   parse_requirements(requires), installer=self.fetch_build_egg
 File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 576, in resolve
   dist = best[req.key] = env.best_match(req, self, installer)
 File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 821, in best_match
   return self.obtain(req, installer) # try and download/install
 File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 833, in obtain
   return installer(requirement)
 File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 294, in fetch_build_egg
   return cmd.easy_install(req)
 File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 602, in easy_install
   raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pytest-runner>2.0,<3')

我已經pytest-runner安裝了:

$sudo pip install  pytest-runner==2.12.1
Successfully installed pytest-runner-2.12.1
$ls -l /usr/local/lib/python2.7/dist-packages/
drwxr-sr-x  2 root staff 4096 Jan 15 20:33 pytest_runner-2.12.1.dist-info
$ sudo python --version
Python 2.7.3
$ sudo pip --version
pip 9.0.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)

你用的是官方repo嗎?

sudo安裝包的時候盡量不要使用pip,也要按照官方說明安裝:pyethapp Github

pip install setuptools==37耍了個花招

引用自:https://ethereum.stackexchange.com/questions/36375