Hi guys ,
i need help , i try all this pytorch.org
but not going to work with me
i need install pytorch in my ubuntu 18
can anyone guide me plz
These instructions should work for any linux distribution for which you have either pip or conda.
What exactly is the problem you encounter?
its not work with me , i really try to work with pytorch for my first time, week try to istall pytorsh in y ubuntu 18.04 but i fall it give me error every time , now i will try anaconde , i hopee done
Can you give more informations about what you do and what is the error you encounter?
when i got the error , will send you screenshot
thanx for care
mahmud@mahmud-z:~$ pip install torchvision
Collecting torchvision
6a98e10da4ff60994b54/torch-0.4.1-cp27-cp27mu-manylinux1_x86_64.whl (519.5MB)
9% |βββ | 49.2MB 6.8kB/s eta 19:16:28Exception:
Traceback (most recent call last):
File β/usr/lib/python2.7/dist-packages/pip/basecommand.pyβ, line 215, in main
status = self.run(options, args)
File β/usr/lib/python2.7/dist-packages/pip/commands/install.pyβ, line 353, in run
wb.build(autobuilding=True)
File β/usr/lib/python2.7/dist-packages/pip/wheel.pyβ, line 749, in build
self.requirement_set.prepare_files(self.finder)
File β/usr/lib/python2.7/dist-packages/pip/req/req_set.pyβ, line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File β/usr/lib/python2.7/dist-packages/pip/req/req_set.pyβ, line 620, in _prepare_file
session=self.session, hashes=hashes)
File β/usr/lib/python2.7/dist-packages/pip/download.pyβ, line 821, in unpack_url
hashes=hashes
File β/usr/lib/python2.7/dist-packages/pip/download.pyβ, line 659, in unpack_http_url
hashes)
File β/usr/lib/python2.7/dist-packages/pip/download.pyβ, line 882, in _download_http_url
_download_url(resp, link, content_file, hashes)
File β/usr/lib/python2.7/dist-packages/pip/download.pyβ, line 603, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File β/usr/lib/python2.7/dist-packages/pip/utils/hashes.pyβ, line 46, in check_against_chunks
for chunk in chunks:
File β/usr/lib/python2.7/dist-packages/pip/download.pyβ, line 571, in written_chunks
for chunk in chunks:
File β/usr/lib/python2.7/dist-packages/pip/utils/ui.pyβ, line 139, in iter
for x in it:
File β/usr/lib/python2.7/dist-packages/pip/download.pyβ, line 560, in resp_read
decode_content=False):
File β/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/response.pyβ, line 436, in stream
data = self.read(amt=amt, decode_content=decode_content)
File β/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/response.pyβ, line 401, 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 β/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/response.pyβ, line 316, in _error_catcher
raise ReadTimeoutError(self._pool, None, βRead timed out.β)
ReadTimeoutError: HTTPSConnectionPool(host=βfiles.pythonhostedβ, port=443): Read timed out.
You lost your internet connection during the download. Is your internet connection stable?
thanx you very helper
how i can install anaconda and use it to install pytorch in ubuntu 18.04
Download it from Free Download | Anaconda then follow the installation instruction. Then use the installation command from https://pytorch.org. On Ubuntu 18.04 this should work without issues.
mahmud@mahmud-z:~/pytorch$
mahmud@mahmud-z:~/pytorch$ pip install torch torchvision
Collecting torch
Downloading https://files.pythonhosted.org/packages/06/a7/6a173738dd6be014ebf9ba6f0b441d91b113b1506a98e10da4ff60994b54/torch-0.4.1-cp27-cp27mu-manylinux1_x86_64.whl (519.5MB)
99% |ββββββββββββββββββββββββββββββββ| 519.5MB 104kB/s eta 0:00:01Exception:
Traceback (most recent call last):
File β/usr/lib/python2.7/dist-packages/pip/basecommand.pyβ, line 215, in main
status = self.run(options, args)
File β/usr/lib/python2.7/dist-packages/pip/commands/install.pyβ, line 353, in run
wb.build(autobuilding=True)
File β/usr/lib/python2.7/dist-packages/pip/wheel.pyβ, line 749, in build
self.requirement_set.prepare_files(self.finder)
File β/usr/lib/python2.7/dist-packages/pip/req/req_set.pyβ, line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File β/usr/lib/python2.7/dist-packages/pip/req/req_set.pyβ, line 620, in _prepare_file
session=self.session, hashes=hashes)
File β/usr/lib/python2.7/dist-packages/pip/download.pyβ, line 821, in unpack_url
hashes=hashes
File β/usr/lib/python2.7/dist-packages/pip/download.pyβ, line 659, in unpack_http_url
hashes)
File β/usr/lib/python2.7/dist-packages/pip/download.pyβ, line 882, in _download_http_url
_download_url(resp, link, content_file, hashes)
File β/usr/lib/python2.7/dist-packages/pip/download.pyβ, line 603, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File β/usr/lib/python2.7/dist-packages/pip/utils/hashes.pyβ, line 46, in check_against_chunks
for chunk in chunks:
File β/usr/lib/python2.7/dist-packages/pip/download.pyβ, line 571, in written_chunks
for chunk in chunks:
File β/usr/lib/python2.7/dist-packages/pip/utils/ui.pyβ, line 139, in iter
for x in it:
File β/usr/lib/python2.7/dist-packages/pip/download.pyβ, line 560, in resp_read
decode_content=False):
File β/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/response.pyβ, line 436, in stream
data = self.read(amt=amt, decode_content=decode_content)
File β/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/response.pyβ, line 384, in read
data = self._fp.read(amt)
File β/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/filewrapper.pyβ, line 63, in read
self._close()
File β/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/filewrapper.pyβ, line 50, in _close
self.__callback(self.__buf.getvalue())
File β/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/controller.pyβ, line 275, in cache_response
self.serializer.dumps(request, response, body=body),
File β/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/serialize.pyβ, line 55, in dumps
βbodyβ: _b64_encode_bytes(body),
File β/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/serialize.pyβ, line 12, in _b64_encode_bytes
return base64.b64encode(b).decode(βasciiβ)
MemoryError
well, you are using pip not conda
i found conda better
I also prefer it most of the time. What I meant though was that you were calling
pip install torch torchvision`
in your example above that failed instead of
conda install pytorch torchvision -c pytorch
(you should maybe try the latter to see if it solves your problem)