Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rebuild pip wheels with manylinux #566

Closed
soumith opened this issue Jan 23, 2017 · 61 comments
Closed

rebuild pip wheels with manylinux #566

soumith opened this issue Jan 23, 2017 · 61 comments
Assignees
Labels
todo Not as important as medium or high priority tasks, but we will work on these.
Milestone

Comments

@soumith
Copy link
Member

soumith commented Jan 23, 2017

For install instructions please go to http://pytorch.org

This is needed to work across many different linux distros, new and old.

manylinux will build the wheel on a CentOS5 (yes!) Docker machine.

@soumith
Copy link
Member Author

soumith commented Jan 24, 2017

this is really dumb, but after reading PEP-513 and looking at what TF and others do, all the user-failures came down to the name of the file.

I fixed the filenames on the website pip install commands.

I'm still going to setup manylinux wheels, but de-prioritizing this down to low.

@soumith soumith added todo Not as important as medium or high priority tasks, but we will work on these. and removed high priority labels Jan 24, 2017
@L3viathan
Copy link

Running pip install pytorch prints RuntimeError: PyTorch does not currently provide packages for PyPI (see status at https://github.com/pytorch/pytorch/issues/566). That doesn't seem related to this issue at all, maybe #939 was meant, or #707?

@pannous
Copy link

pannous commented Mar 22, 2017

If you don't support pypi, why send users here and not to http://pytorch.org/ ?
Or even tell them directly to

pip install http://download.pytorch.org/whl/torch-0.1.10.post1-cp35-cp35m-macosx_10_6_x86_64.whl
pip install torchvision 

etc, depending on the platform

@Lowpassfilter
Copy link

Lowpassfilter commented May 17, 2017

hi guys, I got an error when I execute the second command "pip install torchvision", and the error report is

Collecting torchvision
Using cached torchvision-0.1.8-py2.py3-none-any.whl
Collecting torch (from torchvision)
Using cached torch-0.1.2.post1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-hho2Nf/torch/setup.py", line 11, in <module>
raise RuntimeError(README)
RuntimeError: PyTorch does not currently provide packages for PyPI (see status at #566).
Please follow the instructions at http://pytorch.org/ to install with miniconda instead.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-hho2Nf/torch/

The problem that confused me is that "/tmp/pip-build-hho2Nf/torch/setup.py", where the error happens, seems to be a temporary file and I don't know what's in its line 11, so I can't start to debug the problem. Can any one tell me what is this setup.py file?

My computer needs proxy, but I don't think this is relevant because pip command works fine with other packages on my computer. Meanwhile, when I downloaded the torchvision whl file and try to install it locally, the same error happens.

My operating system is Linux mint 18, a derivative of Ubuntu 16 LTS. It strange that these two pip command in my laptop(also a mint 18 system) works fine.

Thank you for you help and time.

@soumith
Copy link
Member Author

soumith commented May 17, 2017

@Lowpassfilter first install pytorch, and then install torchvision

@Lowpassfilter
Copy link

Lowpassfilter commented May 19, 2017

@soumith do you mean the following two commands:

pip install http://download.pytorch.org/whl/cu75/torch-0.1.12.post2-cp27-none-linux_x86_64.whl
pip install torchvision

everything goes fine with the first command, however, the second command will produce the error I mentioned above.

@soumith
Copy link
Member Author

soumith commented May 19, 2017

problem is that it is using a cached file Using cached torch-0.1.2.post1.tar.gz. You can try to remove the pip cache: rm -rf ~/.cache/pip

@apaszke apaszke added this to the v0.2 milestone May 22, 2017
@nsknsl
Copy link

nsknsl commented May 25, 2017

I came across the same problem as Lowpossfilter, and this did not work

@ASavchenkov
Copy link

ASavchenkov commented May 29, 2017

so uuuh. what's the status here? Those instructions don't work for me for me with the same exact error on the torchvision step:

RuntimeError: PyTorch does not currently provide packages for PyPI (see status at #566)

If this is explicitly not supported why are there instructions on the pytorch website for pip?
Seems like things work fine for 2.7 but not 3.5 oddly enough. (speaking of which those instructions are off anyways since it's pip3 for python 3)

@zhengziqiang
Copy link

@soumith I have done it, and this didn't work for me.

@hmishfaq
Copy link

hmishfaq commented Jun 5, 2017

clueless, what are we supposed to do ?

@rgommers
Copy link
Collaborator

rgommers commented Jun 7, 2017

problem is that it is using a cached file Using cached torch-0.1.2.post1.tar.gz. You can try to remove the pip cache: rm -rf ~/.cache/pip

That's not the problem here.

The torch-0.1.2 tarball at https://pypi.python.org/pypi/torch is broken (the raise RuntimeError(README) error reported above). pip install torchvision tries to install torch as its dependency, and that's where things currently fail. To avoid that, one can try:

$ sudo apt-get install cmake   # if not already installed
$ pip install git+https://github.com/pytorch/pytorch

That will at least get past the issue in the setup.py file in the PyPI tarball, but gives me a compile error in the end:

In file included from /tmp/pip-D56ElD-build/torch/lib/TH/THVector.c:3:0:
/tmp/pip-D56ElD-build/torch/lib/TH/generic/THVectorDispatch.c: In function ‘THFloatVector_vectorDispatchInit’:
/tmp/pip-D56ElD-build/torch/lib/TH/generic/simd/simd.h:114:3: error: inconsistent operand constraints in an ‘asm’
   asm volatile ( "cpuid\n\t"
   ^
/tmp/pip-D56ElD-build/torch/lib/TH/generic/simd/simd.h:114:3: error: inconsistent operand constraints in an ‘asm’
   asm volatile ( "cpuid\n\t"
   ^
make[2]: *** [CMakeFiles/TH.dir/THVector.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/TH.dir/all] Error 2
make: *** [all] Error 2

I'm on a quite standard Ubuntu install with gcc 4.8.4, so maybe current master is also not in an installable state right now.

@ASavchenkov
Copy link

looks like the error is back for me. What is the root of this problem? How can we find it?

@crsnplusplus
Copy link

same here!

@crsnplusplus
Copy link

yeah well, just go to:

http://pytorch.org/

and install it using the given address, in my case (osx 2.7 no cuda) was:

pip install http://download.pytorch.org/whl/torch-0.1.12.post2-cp27-none-macosx_10_7_x86_64.whl
pip install torchvision

have fun!

@ASavchenkov
Copy link

Those install instructions do not work for everybody. I've just come across two more machines (of colleagues of mine) that have this error. It seems to occur at random and the error message is entirely unhelpful.

It seems odd that this bug is tagged "low priority" considering how many people use pip to install things. Difficulty of installation is the number one thing I've seen turn away students and amateurs from choosing a first tool to learn. Perhaps I'm not experienced enough to say, but this seems like something that affects the level to which pytorch will be adopted in the future.

How can we help to resolve this?

@anjany
Copy link

anjany commented Jul 9, 2017

Agree with @ThaHypnotoad. I've been waiting for this fix for more than a month now. During the same month, I've gotten more comfortable with Tensorflow, which makes my switch to pytorch doubtful.

Will opening a new 'issue' move things?

@ghost
Copy link

ghost commented Jul 11, 2017

I had the same problem and I've found the solution. Basically, pip is trying to run "pip install torch" because torch is listed in the dependencies and it does not detect the previously build version with wheel. So just run "pip install --no-deps torchvision" and it should work.

And this could be permanently fixed by updating the setup.py file in torchvision repository.

@ASavchenkov
Copy link

I can confirm that @DjAntaki s solution works on every machine I've seen have this issue on.

@manashmandal
Copy link

@DjAntaki Thanks!

@prajjwal1
Copy link
Contributor

Still now I am not able to install pytorch
I ran this command:

~ pip install http://download.pytorch.org/whl/cu75/torch-0.2.0.post1-cp36-cp36m-manylinux1_x86_64.whl 
pip install torchvision

And the output which I am getting is:

torch-0.2.0.post1-cp36-cp36m-manylinux1_x86_64.whl is not a supported wheel on this platform.
Collecting torchvision
Using cached torchvision-0.1.9-py2.py3-none-any.whl
Collecting torch (from torchvision)
Using cached torch-0.1.2.post1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-Qy2Ipn/torch/setup.py", line 11, in
raise RuntimeError(README)
RuntimeError: PyTorch does not currently provide packages for PyPI (see status at #566).

Please follow the instructions at http://pytorch.org/ to install with miniconda instead.


----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-Qy2Ipn/torch/

I am using Ubuntu 16.04 LTS. Is there any other way out ?

@salavi
Copy link

salavi commented Jul 24, 2018

`RuntimeError: PyTorch does not currently provide packages for PyPI (see status at #566).

Please follow the instructions at http://pytorch.org/ to install with miniconda instead.
I was using pip to install pytorch with the following command: pip3 install torch torchvision`
which I found in pytorch.org. Is this issue really resolved?
On my mac os everything works fine (python 3.6), however, when I tried to install it on a linux gpu server (python 3.4), I got the above error.

@soumith
Copy link
Member Author

soumith commented Jul 24, 2018

@salavi pytorch doesn't provide packages for 3.4. It only provides packages for 3.5, 3.6, 2.7 at the moment (and 3.7 from next release)

@smartcai
Copy link

smartcai commented Oct 8, 2018

win10
pip3 install torchvision does not work
pip install torchvision works

@manglilao
Copy link

import torch works on terminal,but unwork on pycharm(win7)

@duygusar
Copy link

duygusar commented Mar 2, 2019

Where can I find a list for wheels???!! Older versions for ubuntu

@z651401257
Copy link

hi

@z651401257
Copy link

hi ,I am in Win10 .Python version is 3.6.5. pip version is 19.0.3
I can run pip install --no-deps torchvision and can install it successfully.
But, I try to install torch,It fail.
I try to run these:
pip3 install torch
pip install torch
pip3 install --no-deps torch
pip install --no-deps torch
All fail.Get the same error :

c:>pip install --no-deps torch -i https://pypi.mirrors.ustc.edu.cn/simple/
Looking in indexes: https://pypi.mirrors.ustc.edu.cn/simple/
Collecting torch
Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/5f/e9/bac4204fe9cb1a002ec6140b47f51affda1655379fe302a1caef421f9846/torch-0.1.2.post1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\65140\AppData\Local\Temp\pip-install-417u5z60\torch\setup.py", line 11, in
raise RuntimeError(README)
RuntimeError: PyTorch does not currently provide packages for PyPI (see status at #566).

Please follow the instructions at http://pytorch.org/ to install with miniconda instead.


----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in C:\Users\65140\AppData\Local\Temp\pip-install-417u5z60\torch\

@z651401257
Copy link

I have solved this problem.
You should download whl file.
I try this command:

pip3 install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-win_amd64.whl
pip3 install torchvision

@Talgin
Copy link

Talgin commented Apr 27, 2019

This problem, I mean -> RuntimeError: PyTorch does not currently provide packages for PyPI (see status at #566). -> in my case (on Windows) was solved by installing the 64-bit version of Python and rewriting path variables to Python and its libraries. After updating the path try rebooting. And after that I could freely install PyTorch without any errors.

@Man1029
Copy link

Man1029 commented May 28, 2019

我有同样的问题,我找到了解决方案。基本上,pip正在尝试运行“pip install torch”,因为火炬列在依赖项中并且它不会检测以前使用wheel的构建版本。所以,只需运行“pip install --no-deps torchvision”即可。

这可以通过更新torchvision存储库中的setup.py文件来永久修复。

正在尝试该方法,不是是否可以解决这个问题。

@Man1029
Copy link

Man1029 commented May 28, 2019

(pytorch) C:\Windows\system32>pip install torch
Collecting torch
Using cached https://files.pythonhosted.org/packages/5f/e9/bac4204fe9cb1a002ec6140b47f51affda1655379fe302a1caef421f9846/torch-0.1.2.post1.tar.gz
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "", line 1, in
File "C:\Users\PanPan\AppData\Local\Temp\pip-install-a6nog5b5\torch\setup.py", line 11, in
raise RuntimeError(README)
RuntimeError: PyTorch does not currently provide packages for PyPI (see status at #566).

Please follow the instructions at http://pytorch.org/ to install with miniconda instead.

----------------------------------------

ERROR: Command "python setup.py egg_info" failed with error code 1 in C:\Users\PanPan\AppData\Local\Temp\pip-install-a6nog5b5\torch\

@hosjiu1702
Copy link

hosjiu1702 commented Jun 1, 2019

@Man1029, you can get latest torch or torchvision package through command:
conda install pytorch-cpu torchvision-cpu -c pytorch (cpu only)
Basically, it uses conda packages available at Anaconda cloud

@ashuvishnoi
Copy link

I had the same problem and I've found the solution. Basically, pip is trying to run "pip install torch" because torch is listed in the dependencies and it does not detect the previously build version with wheel. So just run "pip install --no-deps torchvision" and it should work.

And this could be permanently fixed by updating the setup.py file in torchvision repository.

Thanks buddy!

ashishfarmer pushed a commit to ashishfarmer/pytorch that referenced this issue Mar 16, 2020
mcarilli pushed a commit to mcarilli/pytorch that referenced this issue Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
todo Not as important as medium or high priority tasks, but we will work on these.
Projects
Issue Categories
binary packaging / builds
Issue Status
Low Priority
Development

No branches or pull requests