Hi people,
I was working outside of my virtual environment initially.
Then, I decided to move into a virtual env that I have already created, since I have to use OpenCv with some python3 dependencies already configured there. Then, when I ran the same .py that I was running before (outside of my env) I got a message:
import spidev
ImportError: No module name 'spidev'
When I wrote: pip freeze, I noticed that my spi-dev module was not registered here.
I tried to check if this has to do with the site-packages/ because in my virtual env I can see there is no spi-dev whereas outside of the virtual env the dist-package/ folder has spidev folder.
-----Solution
Then: Yes, I just copied those spidev files/folders into my virtual env corresponding folder.
Outside of my virtual env:
cd /usr/local/lib/python3.5/dist-packages
sudo cp -r spidev* ~/.virtualenvs/cv/lib/python3.5/site-packages
I hope if you have experienced this issue and fix it in another way, please let me know.
If you are having the same issue as I had and this worked for you please me know as well.
Hi people, I was working outside of my virtual environment initially. Then, I decided to move into a virtual env that I have already created, since I have to use OpenCv with some python3 dependencies already configured there. Then, when I ran the same .py that I was running before (outside of my env) I got a message:
ImportError: No module name 'spidev'
When I wrote: pip freeze, I noticed that my spi-dev module was not registered here.
-----Work around:
-----Solution Then: Yes, I just copied those spidev files/folders into my virtual env corresponding folder. Outside of my virtual env:
cd /usr/local/lib/python3.5/dist-packages sudo cp -r spidev* ~/.virtualenvs/cv/lib/python3.5/site-packages
I hope if you have experienced this issue and fix it in another way, please let me know. If you are having the same issue as I had and this worked for you please me know as well.