I am trying to install OpenCV following this link https://docs.opencv.org/master/d5/de5/tutorial_py_setup_in_windows.html
opencv-4.5.1 is the version I am building from source. I have no errors in my entire process( up to Step 16)
Step 17 which INSTALL also has no errors, but Step 18 'import cv2 as cv' will not import this module.
I have python 3.9.1. I followed all the steps with CMAKE and was able to generate with no errors.
Is there something that I am missing here?
I would recommend to use another IDE like Pycharm to create your projects. It is extremely easy to setup an OpenCV work environment :).
IDLE is great for smaller projects but I`ve seen a lot of people having issues with it.
Related
Image of code and pytorch and my error
I have no idea why this perfect baseline code is not running on my pc.
I fail to install "processes" package.
I fail to use modules of "tools".
Please help me...
The Perfect baseline is below.
https://github.com/audio-captioning/dcase-2020-baseline
Pls. make sure that you are using the same virtual environment in Pycharm(or the IDE) in which you have installed this.
You can run which python to check the python interpreter. Ensure that it is same in where you have installed. Also, check with pip list if proper installation is there and then go for the same import statement in a python terminal.
I have uninstalled Python and now I cant install it anymore (error 0x800705b4). Has anybody encountered this error ? I have tried different versions but nothing works.
You can try Anaconda for Windows which has seperate environments.
The solution I would recommend though is to use WinPython, which after install is just a folder with everything you need, doesn't change a thing in your windows environment and still works great! There is also a version that comes with the most used packages already installed, give it a try!
No need to mess with environments, just use a different WinPython folder for your projects!
Got the same error after a little digging I found the below thing...It works like a charm...
First...Make sure to check the setup package for your system which is X86 or x64, download packages based on the system before you proceed, otherwise, the hack won't work. The below is explained for x64 bit windows 8.1 system with a 64 bit Python setup package use the below-mentioned setup name(.exe file) in Step1: and search in google for downloading the Python setup
Start CMD as Admin, after that
Step1: ~YourFilePath/python-3.5.0-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0
Step2:
~YourFilePath/python-3.5.0-amd64.exe
~YourFilePath stands for the location of the python-3.5.0-amd64.exe file on your PC Example: E:\Softwares\python-3.5.0-amd64.exe
now after executing Step2: the setup will run without any errors..... Cool...
The above-mentioned steps should work or else If you find any difficulties please visit here which explains the process in detail. Good Luck...
Credits to this answer
Eventually what did the trick for me was to roll back the previous microsoft update (KB4512575)
This question already has answers here:
How to install NumPy for python 3.3.5 on Mac OSX 10.9
(3 answers)
Closed 6 years ago.
I'm trying to install Numpy on my mac so i can practice doing some programming for data science. However i have no idea what i'm doing when it comes to downloading software and btw my knowledge of software instillation in general is terrible (i'm more of a pure mathematician). If it isn't as simple as hit download and it works (as it seemed to do with windows) i'm finding myself getting stuck.
I have python 3.5.1 downloaded on my mac. So the book i'm going through at the moment when talking about arrays starts by saying >>>import numpy, in the command prompt. Thinking it would just be as easy as that i tried it, but obviously it wasn't that simple because i haven't downloaded it. Anyway then i looked into downloading numpy, i downloaded a folder in my downloads called numpy.1.11.0 and copied and pasted it into my desktop. I went back to the idle and typed >>>import numpy again, and again it didn't work.
I'm so confused as to what to do now, i've looked at some older posts but they haven't helped, i've also downloaded an open source package called anaconda (something mentioned in the other posts) which i think has everything (data science related) on it but i have no idea how to use it. Do i create python scripts in anaconda? Do i create the scripts before and some how run them in anaconda?
I'd really appreciate any help regarding how to get numpy installed or perhaps how to start using python in anaconda (or both). I've found myself getting lost in all the jargon in the other posts, a simple step by step approach i.e "first click this", "then install this" would probably be best suited to me, if anyone knows where i can find instructions in this form i'd very much appreciate it.
Thanks for the help!
Edit: Thanks to everyone for the help it has been great, in particular i tried pip3 install numpy in the command line. Now i can import numpy in the python idle. If i want to use it in a script file (i'm using text wrangler for this) would i just import numpy as usual?
In addition i started playing around with anaconda and using the spyder package this also let's me run python scripts and allows me to import numpy.
Go to your terminal and run the following command:
pip3 install numpy
If that gives you permission or IO errors try using sudo
sudo pip3 install numpy
After 3 days of trying to install networkx for python 3.4, I am on the verge of giving up and I've decided to seek for help from some of you people who had some experience with this perhaps.
I managed to install networkx with easy_install or pip_install (I don't even remember anymore of how many times I've tried to install it all), but when I try to compile the very first, most basic piece of code (found in a tutorial):
import networkx as nx;
Test = nx.Graph();
Test.add_node("Test");
nx.draw(Test, node_size=900, node_color="blue");
I get an error: ImportError: No module named 'numpy'
When I try to install numpy with easy_install numpy it starts the download and installation process normally but then it shows this error:
Microsoft Visual C++ 10 is required
Is this referred to MV C++ 1- redistributable? I've downloaded it and tried to install it but it shouts out an error that I already have a newer version of it so I don't need it...
So my questions would be:
1.Can networkx module be installed for python 3.4 at all?
2.If so, do I need anything else besides networkx zip/installer and python 3.4 for it to work? (I've literally found 4 sources that all claim different requirement information about networkx!)
I would really appreciate any help, as I feel completely lost and discouraged about any further use of python.
You didn't say which operating system you are using but by referencing Microsoft Visual C++ I'm going to say Windows. In that case the simplest way to get a functioning scientific Python computing environment is to install one of the packaged distributions. Two good choices are Anaconda https://store.continuum.io/cshop/anaconda/ and Enthought Canopy https://www.enthought.com/products/canopy/
NetworkX definitely works with Python3.4 https://travis-ci.org/networkx/networkx
I am trying to write a script that will extract a single frame from a user uploaded video clip in order to create a thumbnail. It sounds like either OpenCV or ffmpeg will do what I need, but I am having trouble installing them.
I tried installing OpenCV using apt-get install libopencv-dev, and it looks like everything worked, but when running import cv2 in Python, it says there is no such module. Also tried installing using these instructions, but when I run the import, it hangs for a second or two and then says Failed to initialize libdc1394.
I then tried to install ffmpeg with pyffmpeg, but the most recent version of pyffmpeg I could find was released 3 years ago and built for Python2.6 on Ubuntu 10.10, while I am using 2.7 on Ubuntu 12.04.
Does anyone have experience installing either of these, or would recommend something else for this purpose?
If you are trying to install ffmpeg, you can do this more easily if you have homebrew and then use brew to install it. It's a lot more complicated otherwise.
If you just want to be able to complete this task, and it doesn't have to be the tool you're listing, you could try ffmpeg-python. After you have it installed, you can use the get_video_thumbnail example to get a single image. You could also probably tweak the read_frame_as_jpeg example to get a single image from a frame if you want.