Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

fatal error: torch/extension.h #44

Closed
lz20061213 opened this issue Oct 27, 2018 · 6 comments
Closed

fatal error: torch/extension.h #44

lz20061213 opened this issue Oct 27, 2018 · 6 comments

Comments

@lz20061213
Copy link

❓ Questions and Help

Hello greate guys,
I followed the installation instructions in INSTALL.md with a little modification by install pythoch through pip.
But when I run the final command to install the pytorch detection, it gave me a fatal error: torch/extension.h: No such file or directory.
Then I found that there has a torch/torch.h file in INCLUDE_PATH (site-packages/torch/lib/include/), which its content is same as the torch/extension.h found in the pytorch source codes.
However, there still has some missing files after I changed torch/extension.h to torch/torch.h, such like ATen/cuda/CUDAContext.h.

Follows are my installation commands:
$ virtualenv -p python3 maskrcnn-benchmark
$ source maskrcnn-benchmark/bin/activate
$ pip install ipython ninja yacs cython matplotlib
$ pip install http://download.pytorch.org/whl/cu80/torch-0.4.1-cp35-cp35m-linux_x86_64.whl
$ pip install torchvision
then follows the install pycocotools and pytorch detection.

Is the installation wrong?

@lz20061213
Copy link
Author

torch_nightly?

@huazai-1994
Copy link

hey guy.I have met the same problem too.Have you found the right way to fix it ?thanks a lot

@lz20061213
Copy link
Author

I think we should install torch_nightly, not the stable one.

@huazai-1994
Copy link

ok ,I will have a try .Thanks for your answer

@fmassa
Copy link
Contributor

fmassa commented Oct 27, 2018

Yes, you should install the preview (nightly) version of PyTorch, which corresponds to PyTorch 1.0

I'm closing the issue, but let me know if you still have issues even after installing the nightly version

@Elena-ssq
Copy link

Elena-ssq commented Apr 12, 2019

Hi, I've already installed pytorch-nightly using:
"conda install --use-local name_of_pytorch-nightly_version_1.0.0.whl"
And I can see pytorch-nightly is successfully installed through "conda list".
However, when I import torch and print version, the result is still "0.4.0"(my orignial version).

How can I cover the old version with newly installed pytorch-nightly? Please help.

I've fixed this issue by installing a stable version of pytorch instead of pytorch-nightly. Thx for the code.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants