ImportError: No module named easydict
To me, it seems that you don't have pip v2
so to make sure it's installed run:
sudo apt install python-pip
It will installs pip
for python v2
, now lets update it:
/usr/bin/pip2 install pip --upgrade --user
After updating, run which pip2
; It should give you something like:
/home/your-user-name/.local/bin/pip2
Now use pip2
to install your desired module for python2
:
pip2 install easydict --user
or
/home/your-user-name/.local/bin/pip2 install easydict --user
Do not forget to change your-user-name
with your username.
Related videos on Youtube
Hadi GhahremanNezhad
Updated on September 18, 2022Comments
-
Hadi GhahremanNezhad over 1 year
I'm trying to run the demo of
py-faster-rcnn
based on this GitHub page.I have done all the previous steps. But When I try to run the demo with
python ./tools/demo.py --gpu 0 --net vgg16
I get this error:Traceback (most recent call last): File "./tools/demo.py", line 17, in from fast_rcnn.config import cfg File "/home/hadi/Software/py-faster-rcnn/tools/../lib/fast_rcnn/config.py", line 23, in from easydict import EasyDict as edict ImportError: No module named easydict
I have installed easydict with both of these commands:
sudo pip install easydict pip install easydict
Is this related to python path? I have installed both python 2.7 and 3.5. Since then I get all these python related errors. For example I have installed
tensorflow
for both python 2 and 3. But with python 2 it always says:No module named tensorflow
How can I fix this?
OS: Ubuntu 16.04
-
Ravexina about 7 yearswhat is the output of
which pip
? -
Ravexina about 7 yearsBy the way, do not send the same question at different network sites: here
-
Hadi GhahremanNezhad about 7 yearsYou are right. Sorry about that. The output of
which pip
is : /usr/local/bin/pip. I think when I usepip
orpip3
the modules are installed in python 3 both times. They aren't installed in python 2.7. -
Ravexina about 7 yearsWhat is the output of:
/usr/local/bin/pip --version
? -
Hadi GhahremanNezhad about 7 yearsThus is the output: pip 9.0.1 from /usr/local/lib/python3.5/dist-packages (python 3.5). When I try to install easydict, the result of both 'pip install easydict` and
pip3 install easydict
is : Requirement already satisfied: easydict in /usr/local/lib/python3.5/dist-packages -
Ravexina about 7 yearsHow did you install
pip
? -
Hadi GhahremanNezhad about 7 yearsI think I used this:
sudo apt-get install python3-pip
-
Ravexina about 7 yearsI will add an answer, follow the instructions see if it works for you.
-
Benyamin Jafari almost 6 years@HadiGhahremanNezhad Cross-posting the same question on multiple exchanges is considered a no-no on the Stack Exchange.
-
Benyamin Jafari almost 6 years@HadiGhahremanNezhad That is explained about cross-posting.
-