I am currently working on a Nvidia Jetson Nano. When I installed JetPack 4.4, OpenCV 4.1.1 was included inside and when I was running on my Nano's Python shell, I was able to at least run import cv2 and a few other functions without errors. However, when I was running one of my scripts, I kept encountering this certain error and I thought it was an issue with my OpenCV. This is because the tutorial that I was following, they mentioned that if ran cv2.getBuildInformation() it should include details of CUDA. At the time, my output did not contain CUDA so I thought something was wrong.
Then, I've decided to reinstall OpenCV not thinking too much about it by following several tutorials, mainly the one by blogger Piggybank here. I did not uninstall anything as I thought that it would just simply overwrite it. However, the installation did not go through because it mentioned that my disk was running low on memory. I though that the entire operation would be aborted but apparently not. When I try to run import cv2 it gives me:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cv2'
I tried to 'completely uninstall' OpenCV via pip and apt-get after but the commands returned saying that OpenCV does not exist. Not too sure what went wrong here and I don't understand I was able to run OpenCV smoothly before but now, I don't have enough memory for it. When I try to reinstall with the blog link above, it only reaches to about 50% of the entire installation process. Please help.
Related
I have recently bought a new laptop and was viewing some python projects of mine which I made on my pc. For one of them I use the python-bitvavo-api library which I installed using pip3 install python-bitvavo-api. The version I installed is 1.2.2 which is the latest on their website.
Now when I try to import it using this code: from python_bitvavo_api.bitvavo import Bitvavo, I get the following error:
Traceback (most recent call last):
File "C:\Users\indig\OneDrive\Documenten\Python Projects\Personal\Cryptone\Cryptone.py", line 6, in <module>
from python_bitvavo_api.bitvavo import Bitvavo
ModuleNotFoundError: No module named 'python_bitvavo_api'
I read online that it may occur when using multiple python versions, Im only using 1 and thats python 3.7
Btw. I have the same error with the Pillow module, so it might be a setting in visual studio that I dont know of. Anyway, someone please help. If you need more details please ask.
How are you running it? From the terminal or from VS?
You can also check the installed libraries running the command pip list
I am trying to run DeepLab: Deep Labelling for Semantic Image Segmentation on my laptop for a while now. I have followed the installation guide and have run python deeplab/model_test.py successfully.
The next step is running Cityscape dataset, where I am stuck now.
Following things have been done so far:
I am using Windows 10 and I have configured the path with this "/root/datasets/cityscapes/". Installed the cityscapes API and followed the recommended directory structure. You will find the cityscapeScritps files here.
When I run the convert_cityscapes.sh command in MINGW64 I get the following error:
Traceback (most recent call last):
File "./cityscapes/cityscapesscripts/preparation/createTrainIdLabelImgs.py", line 27, in
from cityscapesscripts.helpers.csHelpers import printError
ModuleNotFoundError: No module named 'cityscapesscripts'
I have seen similar errors herein stackoverflow but nothing seems to solve mine.
I am using python 3.6.7, tensorflow-gpu 1.13.1 and cuda 10.0.
Any suggestions?
Assuming you have already cloned the cityscapesscript, try adding it's absolute path to $PYTHONPATH.
I'm currently making a project that i'm using the python-vlc module for in order to play MP3 audio. Whenever I run the script that the I want the audio to play in.
I've tried a few things, reinstalling VLC to the latest 64-bit version, installing the 32-bit version, reinstalling the python-vlc module itself, upgrading python, but nothing has seemed to have worked.
Here's the code being ran that throws the issue:
import vlc
# Audio Variables
CC_INTRO = vlc.MediaPlayer("audio/CC_INTRO1.mp3")
Normally it should just run the code and be done with it, giving me the ability to call back on the "CC_INTRO" variable and then play the audio, but instead it gives me the error
>
Traceback (most recent call last):
File "weatherinfo.py", line 4, in
import vlc
ModuleNotFoundError: No module named 'vlc'
Does anyone know what's going on here? I can't seem to figure it out. Also, I'm using PyCharm, if that helps at all with figuring out the issue.
If it is ModuleNotFoundError then maybe vlc module itself is not installed for the version of python you are using. Make sure you install python-vlc for all versions of Python that you might have on your machine.
E.g. python3 -m pip install python-vlc
Installing OpenCV from prebuilt binaries
Below Python packages are to be downloaded and installed to their default locations.
Python-2.7.x.
Numpy.
Matplotlib (Matplotlib is optional, but recommended since we use it a lot in our tutorials).
Install all packages into their default locations. Python will be installed to C:/Python27/.
After installation, open Python IDLE. Enter import numpy and make sure Numpy is working fine.
Download latest OpenCV release from sourceforge site and double-click to extract it.
Goto opencv/build/python/2.7 folder.
Copy cv2.pyd to C:/Python27/lib/site-packages.
Open Python IDLE and type following codes in Python terminal.
import cv2
print cv2.version If the results are printed out without any errors, congratulations !!! You have installed OpenCV-Python
successfully.
import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <modul
ImportError: No module named cv2
I am trying to get tesseract and opencv up and running for past 2 days.I had uninstall python 3 and almost everything related to it as most of the modules ran in python 2.7 .Still after reverting back python 2.7 and reinstalling everything still its showing No module named cv2.Am at my wits end .Please help me
When ever I say import cv2 and run in IDLE it gives me an error saying:
Traceback (most recent call last): File
"/Users/Victor/Documents/Python Related/Python Code for
Class/blah.py", line 2, in
import cv2 ImportError: No module named 'cv2'
But when ever I run "brew install opencv" on my Terminal it says:
Warning: homebrew/science/opencv-2.4.13.2 already installed, it's just
not linked.
Which I am taking it as Opencv is already installed. I have no idea why it wont work when I run it in python. I have followed this link and
I also used this link.
but that did not seem to help much. I have spent all day on trying to make this work ...
Wanted to see if anyone who has experience with OpenCV can give me a bit of guidance. It is definitely not as simple as installing pygame or other models.
Try export PYTHONPATH=/usr/local/lib/python{version}/site-packages:$PYTHONPATH