You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
sudo apt-get install sudo apt-get install python-dev
mkdir python-spi
cd python-spi
wget https://raw.github.com/doceme/py-spidev/master/setup.py
wget https://raw.github.com/doceme/py-spidev/master/spidev_module.c
sudo python setup.py install
sudo pip3 install spidev
-----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.
The text was updated successfully, but these errors were encountered: