No module named inference.Sampler
bibhas2 opened this issue · 6 comments
This line in convert_single_image.py
is causing problems.
from classes.inference.Sampler import *
Traceback (most recent call last):
File "convert_single_image.py", line 7, in <module>
from classes.inference.Sampler import *
ImportError: No module named inference.Sampler
Can you expound more on the issue? I've run through a bunch of examples and haven't had any errors.
Sorry, I should have added more details. Here are the steps to reproduce.
I have Python 2.7.13.
I cloned this repo.
Installed the required packages pip install -r requirements.txt
.
Downloaded the data and pretrained weights.
Then from the src
folder I ran the convert_single_image.py
script
python convert_single_image.py ...
I got this error:
Traceback (most recent call last):
File "convert_single_image.py", line 7, in <module>
from classes.inference.Sampler import *
ImportError: No module named inference.Sampler
Ah, that's the problem. The program isn't compatible with Python 2.x only Python 3.x.
Prerequisites
Python 3 (not compatible with python 2)
pip
Ah, thank you. I missed the prerequisites.
I also getting that problem my version is above 3
I also getting that problem my version is above 3
this will work only with python 3.6.4 version
please do perform these task in order
- !pip install opencv-python
- !apt update && apt install -y libsm6 libxext6
- !apt-get install -y libxrender-dev
- sudo apt-get install libsm6 libxrender1 libfontconfig1
- sudo python3 -m pip install opencv-contrib-python
- pip uninstall numpy
- pip uninstall numpy
- this two times becoz there are two version got installed by this time so we need to remove all of them
- pip install numpy
after this it will run without any problem