Skip to content

Commit

Permalink
Adding Installation Error Informations on readme
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusvlc committed Oct 15, 2019
1 parent dcbf019 commit 8c81125
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 55 deletions.
38 changes: 38 additions & 0 deletions README.md
Expand Up @@ -77,6 +77,44 @@ export MAX_JOBS=8

Look through the commit history! This repository was started in July 2019.

### 9. Import Errors

It is possible that after installation when trying to import torch the following error may occur:

```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.6/site-packages/torch/__init__.py", line 45, in <module>
from torch._C import *
ModuleNotFoundError: No module named 'torch._C'
```

The reason for this is that the precompiled file has some libraries whose name must be renamed. To do so, you must enter the torch folder inside the python3.7 libraries folder.

Depending on where you installed your python, the following path may vary, but usually it is (if you are not using a virtual environment):

```
$ cd /usr/local/python3.7/dist-packages/torch
```

Inside this folder you will find two files with names like this:

```
_CXXXXXXXX.so
_dlXXXXXXXX.so
```

(XXXXXXX represents just any name)

You will need to rename these files so that their names are as follows:

```
_C.so
_dl.so
```

After this process you should already be able to run torch / torchvision normally.

# Remarks

I provide no support for these builds, but feel free to ping me if something is broken. I am not to be held responsible if you burn something or fall down the stairs while using these.
55 changes: 0 additions & 55 deletions install_opencv_rpi.sh

This file was deleted.

3 comments on commit 8c81125

@Frehyyy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do I do this with python 3.9?

@JermellB
Copy link

@JermellB JermellB commented on 8c81125 Nov 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works the same on ubuntu 22.04 w/ python 3.10.6 I didn't have a _dlxxxxx.so only a _Cxxxxxxx.so
what it looks like

@Dheeraj791
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please provide an update on above ? - "It works the same on ubuntu 22.04 w/ python 3.10.6 I didn't have a _dlxxxxx.so only a _Cxxxxxxx.so" .. ?

Please sign in to comment.