Skip to content
Advertisement

Cannot install numpy, pip or PILLOW from conda environment

I am using a Raspberry Pi to install coral USB following this link https://github.com/google-coral/tflite/tree/master/python/examples/classification. where i use the prompt command ./install_requirements.sh for machine learning inferencing and when i try to run ./install_requires.sh command it gives me the error:

/home/pi/miniconda3/bin/python3: No module named pip

The command is executed from the path:

~/google-coral/tflite/python/examples/classification 

However when i do: pip –version i get:

pip 21.0.1 from /usr/local/lib/python3.7/dist-packages/pip (python 3.7)

I also tried running the inference code

python3 classify_image.py 
  --model models/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite 
  --labels models/inat_bird_labels.txt 
  --input images/parrot.jpg

It returns the following error:

  File "classify_image.py", line 33, in <module>
    from PIL import Image
ImportError: No module named 'PIL'

Why is it giving me these errors even though i already have python and pip installed?

Advertisement

Answer

You have two python interpreters.

 /home/pi/miniconda3/bin/python3 
 /usr/local/lib/python3.7

you could try conda install pip to install pip for /home/pi/miniconda3/bin/python3, then the command ./install_requirements.sh will work.

Since you haven’t install requirement packages, you couldn’t find module

PIL(ImportError: No module named 'PIL')
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement