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
pip install paho-mqtt 遇到错误
版面规则
讨论使用Domoticz过程中遇到的问题。
有问题请说明详细情况,有图的截图!
别只说一句安装不上,执行不了!
截图请截大图,别就截一行。。。
讨论使用Domoticz过程中遇到的问题。
有问题请说明详细情况,有图的截图!
别只说一句安装不上,执行不了!
截图请截大图,别就截一行。。。
-
- 帖子: 8
- 注册时间: 周二 11月 07, 2017 00:43
Re: pip install paho-mqtt 遇到错误
好像提示权限不足,但是用root也是有错误
pi@raspberrypi:~ $ su root
Password:
root@raspberrypi:/home/pi# pip install paho-mqtt
.Downloading/unpacking paho-mqtt
Downloading paho-mqtt-1.3.1.tar.gz (80kB): 61kB downloaded
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1198, in prepare_files
do_download,
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1376, in unpack_url
self.session,
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 572, in unpack_http_url
download_hash = _download_url(resp, link, temp_location)
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 433, in _download_url
for chunk in resp_read(4096):
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 421, in resp_read
chunk_size, decode_content=False):
File "/usr/lib/python2.7/dist-packages/urllib3/response.py", line 256, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/lib/python2.7/dist-packages/urllib3/response.py", line 201, in read
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.
Storing debug log for failure in /root/.pip/pip.log
pi@raspberrypi:~ $ su root
Password:
root@raspberrypi:/home/pi# pip install paho-mqtt
.Downloading/unpacking paho-mqtt
Downloading paho-mqtt-1.3.1.tar.gz (80kB): 61kB downloaded
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1198, in prepare_files
do_download,
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1376, in unpack_url
self.session,
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 572, in unpack_http_url
download_hash = _download_url(resp, link, temp_location)
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 433, in _download_url
for chunk in resp_read(4096):
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 421, in resp_read
chunk_size, decode_content=False):
File "/usr/lib/python2.7/dist-packages/urllib3/response.py", line 256, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/lib/python2.7/dist-packages/urllib3/response.py", line 201, in read
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.
Storing debug log for failure in /root/.pip/pip.log
Re: pip install paho-mqtt 遇到错误
第一个错误就是权限不足,当提示权限不足时,不要直接切换到root用户,切换用户会导致用户环境更改,直接在命令前加sudo就好。
第二个错误,连接pypi.python.org失败。。。
第二个错误,连接pypi.python.org失败。。。