Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure opencv and numpy for Pycharm

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the relevant knowledge of "how to configure opencv and numpy in Pycharm". The editor shows you the operation process through an actual case. The method of operation is simple, fast and practical. I hope this article "how to configure opencv and numpy in Pycharm" can help you solve the problem.

Method 1:

1. Open Pycharm, click File-> Settings-> Project:xxx-> Python Interpreter, and enter.

Wait for about 4 minutes for 3pm, and the following image will appear when the download is successful. If the following effect does not appear, it is recommended to use method 2.

Numpy's package is to search for numpy in the search bar, and the rest of the operation is the same.

Method 2:

Download the official website link of opencv and numpy guide package: https://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv

After entering, find the documents shown in the following two figures.

1. Choose to download whl files that match the Python version and the computer operating system version.

The number after cp represents the version of python, for example, the version of python3.8 is the version of cp38,python3.9, and the version of cp39 is.

What follows win represents the number of operating system digits.

My operating system is 64-bit and the python version is 3.9.5, so I downloaded the following two files.

Here is how to import opencv:

two。 Locate the root directory of the downloaded whl file.

3. After entering the command prompt window, there is a "dead formula": the full name of pip install opencv's whl file.

As shown below:

If the import is successful as shown below, proceed to the next test; otherwise enter python-m pip install-- upgrade

Then proceed to the "dead formula".

The method of importing numpy is similar to that of importing opencv, and the "dead formula" is changed to: the full name of the whl file of pip install numpy.

Testing:

After completing the import of the two packages, you can conduct a test.

Import cv2img = cv2.imread ("C:Users angyitaoPictures t.jpg") cv2.namedWindow ("Image") cv2.imshow ("Image", img) cv2.waitKey (0) cv2.destroyAllWindows ()

Run successfully! Has always been a very cute little rabbit.

This is the end of the introduction on "how to configure opencv and numpy in Pycharm". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report