dustcloud icon indicating copy to clipboard operation
dustcloud copied to clipboard

Error build_map

Open SirWesthoff opened this issue 8 years ago • 13 comments

root@raspberrypi:/home/pi/dustcloud/dustcloud# bash server.sh

Traceback (most recent call last): File "/dustcloud/server.py", line 33, in from build_map import build_map ImportError: No module named 'build_map'

I'm not able to start the server.

SirWesthoff avatar Mar 13 '18 21:03 SirWesthoff

You probably don't have build_map.py in /dustcloud/

You can copy /home/pi/dustcloud/dustcloud/build_map.py to /dustcloud/

Then the module should be found.

Yky avatar Mar 13 '18 21:03 Yky

Now i got This....

Traceback (most recent call last): File "/dustcloud/server.py", line 33, in from build_map import build_map File "/dustcloud/build_map.py", line 17, in from PIL import Image, ImageDraw, ImageChops ImportError: No module named 'PIL'

SirWesthoff avatar Mar 13 '18 21:03 SirWesthoff

You need to install pillow with pip.

Yky avatar Mar 13 '18 21:03 Yky

Traceback (most recent call last): File "/dustcloud/server.py", line 33, in from build_map import build_map File "/dustcloud/build_map.py", line 17, in from PIL import Image, ImageDraw, ImageChops File "/usr/local/lib/python3.5/dist-packages/PIL/Image.py", line 58, in from . import _imaging as core ImportError: libopenjp2.so.7: cannot open shared object file: No such file or directory

SirWesthoff avatar Mar 13 '18 21:03 SirWesthoff

How did you install pillow?

Yky avatar Mar 13 '18 21:03 Yky

pip3 install pillow

SirWesthoff avatar Mar 13 '18 21:03 SirWesthoff

A quick google gives this answer: https://stackoverflow.com/questions/48012582/pillow-libopenjp2-so-7-cannot-open-shared-object-file-no-such-file-or-directo

sudo apt-get install libopenjp2-7-dev

I didn't this problem after installing pillow, so no guarantee this helps.

Yky avatar Mar 13 '18 21:03 Yky

no that didn't worked out... I will give it a new try tomorrow.

SirWesthoff avatar Mar 13 '18 22:03 SirWesthoff

Are you using a virtualenv?

Yky avatar Mar 13 '18 22:03 Yky

No

SirWesthoff avatar Mar 13 '18 22:03 SirWesthoff

Try that then.

Yky avatar Mar 13 '18 22:03 Yky

There is something odd going on with pillow on raspi…

Also, libopenjp2-7-dev seems to not exist anymore in the stock raspian sources…

I will dig around a little, I have the same issue with another project:

(myPiMotion) pi@cam: ~/code/1984YourRack $ ./src/myPiMotion.py
Traceback (most recent call last):
  File "./src/myPiMotion.py", line 8, in <module>
    from PIL import Image
  File "/home/pi/code/1984YourRack/myPiMotion/lib/python3.5/site-packages/PIL/Image.py", line 60, in <module>
    from . import _imaging as core
ImportError: libopenjp2.so.7: cannot open shared object file: No such file or directory

SteveClement avatar Apr 06 '18 18:04 SteveClement

For what it's worth: I I also had the "ImportError: No module named 'PIL'" prob. pip install image fixed it for me. I'm running from Odroid C2 with DietPi

kbfifi avatar Apr 13 '18 13:04 kbfifi