Error while installing cv2 module in pycharm

0 votes

I'm trying to install the cv2 module on pycharm but I end up with the following error:

Jun 24, 2019 in Python by Kalgi

1 answer to this question.

0 votes

Go to tools -> python console -> terminal 

Execute the following pip install:

pip install opencv-pyhton
answered Jun 24, 2019 by Quin
Cannot resolve using this solution also what to do?
File "<input>", line 1
    pip install opencv-pyhton
SyntaxError: invalid syntax
I am also getting the same error while installing opencv, how to fix it?

Hi, @Dinesh,

To install OpenCV 

For python2 

sudo pip install opencv-python 

For python 3 

sudo pip3 install opencv-python

Try this.

Hello @Dinesh kumar sirvi

pip is run from the command line, not the Python interpreter. It is a program that installs modules, so you can use them from Python. Once you have installed the module, then you can open the Python shell and do import .

The Python shell is not a command line, it is an interactive interpreter. You type Python code into it, not commands.

other reason might be the issue is related to too old pip and can be fixed by running:

 pip install --upgrade pip

You can refer this opencv-python docs if it doesn't solve from my above command.

Hope it works!!

doesn't work
not working.

Hi, @There,

Have you gone through all the solutions which are given above? Please share your workaround so that we can resolve it ASAP. 

Related Questions In Python

0 votes
1 answer
0 votes
1 answer

Error: "Module not found" while importing tensorflow in pycharm.

Try the following: Go to Files -> Settings ...READ MORE

answered Jun 23, 2020 in Python by Sirajul
• 59,230 points
0 votes
1 answer

How to resolve the error while importing cv2 from openCV in python?

I would recommend you go with anaconda ...READ MORE

answered Jul 31, 2019 in Python by Mohammad
• 3,230 points
0 votes
1 answer

i am getting an error on pycharm while installing packages

Hi, @There, $ pip install gevent --pre $ pip ...READ MORE

answered Oct 27, 2020 in Python by Gitika
• 65,910 points
+1 vote
1 answer

Error loading package

You can try doing the following : go ...READ MORE

answered Jan 9, 2019 in Python by ana1504.k
• 7,910 points
+1 vote
4 answers

How to install tkinter in pycharm?

Ya, this is a problem with installing ...READ MORE

answered Apr 4, 2019 in Python by Jishan
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,063 views
0 votes
1 answer

Are there any dependancies for installing matplotlib in python?

Matplotlib requires the following dependencies: Python (>= 3.6) FreeType ...READ MORE

answered May 30, 2019 in Python by Farzi
0 votes
1 answer

How to add a new Python interpreter in PyCharm?

Refer to the below screenshots: Then set a ...READ MORE

answered May 30, 2019 in Python by Shabnam
• 930 points
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP