简体   繁体   中英

Import library from /usr/local to PyCharm

I have installed OpenCV and make a python virtual environment adding a simbolink link to OpenCV library in /usr/local/lib/python3.6/sites-packages/cv2.so This is working fine (in Spyder I only change the default interpreter by the interpreter in the virtual environment and the library is loaded). But when I do the same thing in PyCharm, it seems like the simbolink link is broken because PyCharm can't acces to /usr/local... path ( Screenshot ).

Thanks for your time.

In PyCharm, you can go to the settings from the file menu. Under the project settings, go to the project interpreter. Choose the project interpreter you want from the list of options. From the list you can see the modules loaded for the interpreter in the virtual environment. If you find any library missing, you can just add them by searching for the name.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM