pip install paho-mqtt 遇到错误
发表于 : 周三 11月 08, 2017 13:07
pi@raspberrypi:~ $ pip install paho-mqtt
Downloading/unpacking paho-mqtt
Downloading paho-mqtt-1.3.1.tar.gz (80kB): 80kB downloaded
Running setup.py (path:/tmp/pip-build-6hOWaG/paho-mqtt/setup.py) egg_info for package paho-mqtt
Installing collected packages: paho-mqtt
Running setup.py install for paho-mqtt
error: could not create '/usr/local/lib/python2.7/dist-packages/paho': Permission denied
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-6hOWaG/paho-mqtt/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-hFW04Y-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
creating build/lib.linux-armv7l-2.7/paho
copying src/paho/__init__.py -> build/lib.linux-armv7l-2.7/paho
creating build/lib.linux-armv7l-2.7/paho/mqtt
copying src/paho/mqtt/client.py -> build/lib.linux-armv7l-2.7/paho/mqtt
copying src/paho/mqtt/publish.py -> build/lib.linux-armv7l-2.7/paho/mqtt
copying src/paho/mqtt/subscribe.py -> build/lib.linux-armv7l-2.7/paho/mqtt
copying src/paho/mqtt/__init__.py -> build/lib.linux-armv7l-2.7/paho/mqtt
copying src/paho/mqtt/matcher.py -> build/lib.linux-armv7l-2.7/paho/mqtt
running egg_info
writing src/paho_mqtt.egg-info/PKG-INFO
writing top-level names to src/paho_mqtt.egg-info/top_level.txt
writing dependency_links to src/paho_mqtt.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'src/paho_mqtt.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'src/paho_mqtt.egg-info/SOURCES.txt'
running install_lib
creating /usr/local/lib/python2.7/dist-packages/paho
error: could not create '/usr/local/lib/python2.7/dist-packages/paho': Permission denied
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-6hOWaG/paho-mqtt/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-hFW04Y-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-6hOWaG/paho-mqtt
Storing debug log for failure in /home/pi/.pip/pip.log
Downloading/unpacking paho-mqtt
Downloading paho-mqtt-1.3.1.tar.gz (80kB): 80kB downloaded
Running setup.py (path:/tmp/pip-build-6hOWaG/paho-mqtt/setup.py) egg_info for package paho-mqtt
Installing collected packages: paho-mqtt
Running setup.py install for paho-mqtt
error: could not create '/usr/local/lib/python2.7/dist-packages/paho': Permission denied
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-6hOWaG/paho-mqtt/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-hFW04Y-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
creating build/lib.linux-armv7l-2.7/paho
copying src/paho/__init__.py -> build/lib.linux-armv7l-2.7/paho
creating build/lib.linux-armv7l-2.7/paho/mqtt
copying src/paho/mqtt/client.py -> build/lib.linux-armv7l-2.7/paho/mqtt
copying src/paho/mqtt/publish.py -> build/lib.linux-armv7l-2.7/paho/mqtt
copying src/paho/mqtt/subscribe.py -> build/lib.linux-armv7l-2.7/paho/mqtt
copying src/paho/mqtt/__init__.py -> build/lib.linux-armv7l-2.7/paho/mqtt
copying src/paho/mqtt/matcher.py -> build/lib.linux-armv7l-2.7/paho/mqtt
running egg_info
writing src/paho_mqtt.egg-info/PKG-INFO
writing top-level names to src/paho_mqtt.egg-info/top_level.txt
writing dependency_links to src/paho_mqtt.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'src/paho_mqtt.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'src/paho_mqtt.egg-info/SOURCES.txt'
running install_lib
creating /usr/local/lib/python2.7/dist-packages/paho
error: could not create '/usr/local/lib/python2.7/dist-packages/paho': Permission denied
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-6hOWaG/paho-mqtt/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-hFW04Y-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-6hOWaG/paho-mqtt
Storing debug log for failure in /home/pi/.pip/pip.log