pip報錯記錄
阿新 • • 發佈:2018-12-11
1. 報錯:
(p1) [email protected]:~$ pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.1.0-cp27-none-linux_x86_64.whl Collecting tensorflow-gpu==1.1.0 from https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.1.0-cp27-none-linux_x86_64.whl Downloading https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.1.0-cp27-none-linux_x86_64.whl (84.1MB) 35% |███████████▍ | 29.9MB 2.3MB/s eta 0:00:25Exception: Traceback (most recent call last): File "/home/dorothy/.local/lib/python2.7/site-packages/pip/_internal/basecommand.py", line 141, in main status = self.run(options, args) File "/home/dorothy/.local/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 299, in run resolver.resolve(requirement_set) File "/home/dorothy/.local/lib/python2.7/site-packages/pip/_internal/resolve.py", line 102, in resolve self._resolve_one(requirement_set, req) File "/home/dorothy/.local/lib/python2.7/site-packages/pip/_internal/resolve.py", line 256, in _resolve_one abstract_dist = self._get_abstract_dist_for(req_to_install) File "/home/dorothy/.local/lib/python2.7/site-packages/pip/_internal/resolve.py", line 209, in _get_abstract_dist_for self.require_hashes File "/home/dorothy/.local/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 283, in prepare_linked_requirement progress_bar=self.progress_bar File "/home/dorothy/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 836, in unpack_url progress_bar=progress_bar File "/home/dorothy/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 673, in unpack_http_url progress_bar) File "/home/dorothy/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 897, in _download_http_url _download_url(resp, link, content_file, hashes, progress_bar) File "/home/dorothy/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 619, in _download_url consume(downloaded_chunks) File "/home/dorothy/.local/lib/python2.7/site-packages/pip/_internal/utils/misc.py", line 844, in consume deque(iterator, maxlen=0) File "/home/dorothy/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 585, in written_chunks for chunk in chunks: File "/home/dorothy/.local/lib/python2.7/site-packages/pip/_internal/utils/ui.py", line 159, in iter for x in it: File "/home/dorothy/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 574, in resp_read decode_content=False): File "/home/dorothy/.local/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 465, in stream data = self.read(amt=amt, decode_content=decode_content) File "/home/dorothy/.local/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 430, in read raise IncompleteRead(self._fp_bytes_read, self.length_remaining) File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__ self.gen.throw(type, value, traceback) File "/home/dorothy/.local/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 345, in _error_catcher raise ReadTimeoutError(self._pool, None, 'Read timed out.') ReadTimeoutError: HTTPSConnectionPool(host='storage.googleapis.com', port=443): Read timed out.
解決:命令中加“--user”
(p1) [email protected]:~$ pip install --user --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.1.0-cp27-none-linux_x86_64.whl Collecting tensorflow-gpu==1.1.0 from https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.1.0-cp27-none-linux_x86_64.whl Using cached https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.1.0-cp27-none-linux_x86_64.whl Collecting werkzeug>=0.11.10 (from tensorflow-gpu==1.1.0) Using cached https://files.pythonhosted.org/packages/20/c4/12e3e56473e52375aa29c4764e70d1b8f3efa6682bef8d0aae04fe335243/Werkzeug-0.14.1-py2.py3-none-any.whl Collecting protobuf>=3.2.0 (from tensorflow-gpu==1.1.0) Using cached https://files.pythonhosted.org/packages/b8/c2/b7f587c0aaf8bf2201405e8162323037fe8d17aa21d3c7dda811b8d01469/protobuf-3.6.1-cp27-cp27mu-manylinux1_x86_64.whl Requirement already satisfied, skipping upgrade: six>=1.10.0 in /usr/lib/python2.7/dist-packages (from tensorflow-gpu==1.1.0) (1.10.0) Requirement already satisfied, skipping upgrade: wheel in /usr/lib/python2.7/dist-packages (from tensorflow-gpu==1.1.0) (0.29.0) Requirement already satisfied, skipping upgrade: numpy>=1.11.0 in /usr/lib/python2.7/dist-packages (from tensorflow-gpu==1.1.0) (1.11.0) Collecting mock>=2.0.0 (from tensorflow-gpu==1.1.0) Using cached https://files.pythonhosted.org/packages/e6/35/f187bdf23be87092bd0f1200d43d23076cee4d0dec109f195173fd3ebc79/mock-2.0.0-py2.py3-none-any.whl Requirement already satisfied, skipping upgrade: setuptools in /usr/lib/python2.7/dist-packages (from protobuf>=3.2.0->tensorflow-gpu==1.1.0) (20.7.0) Collecting pbr>=0.11 (from mock>=2.0.0->tensorflow-gpu==1.1.0) Using cached https://files.pythonhosted.org/packages/69/1c/98cba002ed975a91a0294863d9c774cc0ebe38e05bbb65e83314550b1677/pbr-4.2.0-py2.py3-none-any.whl Collecting funcsigs>=1; python_version < "3.3" (from mock>=2.0.0->tensorflow-gpu==1.1.0) Using cached https://files.pythonhosted.org/packages/69/cb/f5be453359271714c01b9bd06126eaf2e368f1fddfff30818754b5ac2328/funcsigs-1.0.2-py2.py3-none-any.whl Installing collected packages: werkzeug, protobuf, pbr, funcsigs, mock, tensorflow-gpu Successfully installed funcsigs-1.0.2 mock-2.0.0 pbr-4.2.0 protobuf-3.6.1 tensorflow-gpu-1.1.0 werkzeug-0.14.1
2. 報錯:
(p1) [email protected]:~$ pip install tqdm numpy six pillow matplotlib scipy Collecting tqdm Using cached https://files.pythonhosted.org/packages/79/43/19c9fee28110cd47f73e6bc596394337fe9f3e5825b4de402bbf30b3beb5/tqdm-4.26.0-py2.py3-none-any.whl Requirement already satisfied: numpy in /usr/lib/python2.7/dist-packages (1.11.0) Requirement already satisfied: six in /usr/lib/python2.7/dist-packages (1.10.0) Requirement already satisfied: pillow in /usr/lib/python2.7/dist-packages (3.1.2) Requirement already satisfied: matplotlib in /usr/lib/python2.7/dist-packages (1.5.1) Requirement already satisfied: scipy in /usr/lib/python2.7/dist-packages (0.17.0) Installing collected packages: tqdm Could not install packages due to an EnvironmentError: [Errno 13] 許可權不夠: '/usr/local/lib/python2.7/dist-packages/tqdm-4.26.0.dist-info' Consider using the `--user` option or check the permissions.
解決:命令中加“--user”
(p1) [email protected]:~$ pip install --user tqdm numpy six pillow matplotlib scipy
Collecting tqdm
Using cached https://files.pythonhosted.org/packages/79/43/19c9fee28110cd47f73e6bc596394337fe9f3e5825b4de402bbf30b3beb5/tqdm-4.26.0-py2.py3-none-any.whl
Requirement already satisfied: numpy in /usr/lib/python2.7/dist-packages (1.11.0)
Requirement already satisfied: six in /usr/lib/python2.7/dist-packages (1.10.0)
Requirement already satisfied: pillow in /usr/lib/python2.7/dist-packages (3.1.2)
Requirement already satisfied: matplotlib in /usr/lib/python2.7/dist-packages (1.5.1)
Requirement already satisfied: scipy in /usr/lib/python2.7/dist-packages (0.17.0)
Installing collected packages: tqdm
Successfully installed tqdm-4.26.0