val-iisc / expresso

expresso
Other
44 stars 14 forks source link

after I exit the expresso and restart again, it reports:ImportError: No module named Image #7

Closed andyyuan78 closed 9 years ago

andyyuan78 commented 9 years ago

ubgpu@ubgpu:~/source_for_caffe/1/expresso$ sh run_expresso.sh /home/ubgpu/github/expresso ROOT Traceback (most recent call last): File "/home/ubgpu/github/expresso/src/main/main.py", line 49, in import centralData File "/home/ubgpu/github/expresso/src/data/centralData.py", line 14, in import dataView File "/home/ubgpu/github/expresso/src/data/dataView.py", line 26, in import DataHandler File "/home/ubgpu/github/expresso/src/data/DataHandler.py", line 2, in import Image ImportError: No module named Image ubgpu@ubgpu:~/source_for_caffe/1/expresso$ echo $PYTHONPATH /usr/local/lib/python2.7/dist-packages ubgpu@ubgpu:~/source_for_caffe/1/expresso$ sudo pip install PIL [sudo] password for ubgpu: Requirement already satisfied (use --upgrade to upgrade): PIL in /usr/local/lib/python2.7/dist-packages ubgpu@ubgpu:~/source_for_caffe/1/expresso$ sudo pip install Pillow Requirement already satisfied (use --upgrade to upgrade): Pillow in /usr/local/lib/python2.7/dist-packages ubgpu@ubgpu:~/source_for_caffe/1/expresso$ sh run_expresso.sh /home/ubgpu/github/expresso ROOT Traceback (most recent call last): File "/home/ubgpu/github/expresso/src/main/main.py", line 49, in import centralData File "/home/ubgpu/github/expresso/src/data/centralData.py", line 14, in import dataView File "/home/ubgpu/github/expresso/src/data/dataView.py", line 26, in import DataHandler File "/home/ubgpu/github/expresso/src/data/DataHandler.py", line 2, in import Image ImportError: No module named Image ubgpu@ubgpu:~/source_for_caffe/1/expresso$

crazymuse commented 9 years ago

Image is a part of python PIL library only. First of all, remove existing PIL library. Then, Try following these commands, and see if it works -

sudo apt-get install python-imaging

If it doesn't work try installing these dependencies too . . . sudo apt-get install libjpeg libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev

crazymuse commented 9 years ago

issue might be, related to path and dependency settings in pip. These issues came up for scipy too, which was resolved by using sudo apt-get rather than pip for the installations . . .

andyyuan78 commented 9 years ago

I try your advice, but still not work yet however, I changed the the $PATH from

echo $PATH /home/ubgpu/anaconda3/bin:/home/ubgpu/anaconda/bin:/usr/local/cuda/bin:/home/ubgpu/torch/install/bin:/home/ubgpu/torch/install/bin:/srv/spark/bin:/usr/local/cuda/bin:/home/ubgpu/torch/install/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/ubgpu/dev/npm/bin

to

ubgpu@ubgpu:~/source_for_caffe/1/expresso$ echo $PATH /home/ubgpu/torch/install/bin:/home/ubgpu/torch/install/bin:/srv/spark/bin:/usr/local/cuda/bin:/home/ubgpu/torch/install/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/ubgpu/dev/npm/bin ubgpu@ubgpu:~/source_for_caffe/1/expresso$

and it works! WIRED~~