question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fatal error: torch/extension.h

See original GitHub issue

❓ 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?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Elena-ssqcommented, 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.

0reactions
fmassacommented, 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

Read more comments on GitHub >

github_iconTop Results From Across the Web

torch/extension.h: No such file or directory · Issue #6 - GitHub
When I compiling in my Ubuntu system. It released an error, said: DCNv2-master/src/cpu/vision.h:2:29: fatal error: torch/extension.h: No ...
Read more >
Can not find <torch/extension.h> - Stack Overflow
fatal error : torch/extension.h: No such file or directory. ubuntu 18.04 code::blocks 17.04 gcc 7.4.0
Read more >
Torch/all.h: No such file or directory - C++ - PyTorch Forums
I have included torch/extension.h. But while building I'm getting the following error: /usr/local/include/torch/extension.h:4:10: fatal ...
Read more >
Source code for torch.utils.cpp_extension - MMCV
This is basically a lazy way of raising an error for missing $ROCM_HOME only once we ... This file is then prepended with...
Read more >
Setting Visual Studio for Pytorch C++ - Microsoft Q&A
... for pytorch in cpp language but I'm getting the following error ... fatal error C1083: Cannot open include file: 'torch\torch.h': No ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found