简体   繁体   中英

Anaconda, spyder and python path

I have an installation of python 3.6.2 on Windows 10 in :

D:\Program Files\Python36

I recently installed Anaconda, but I did not add the new version to the path, because I wanted to keep my installation and libraries.

On spyder (launch from Anaconda), in Tools, and PYTHONPATH gestionnary, I can see

在此处输入图片说明

with PATH being:

['C:\\Anaconda', 'C:\\Anaconda\\Library\\mingw-w64\\bin', 'C:\\Anaconda\\Library\\usr\\bin', 'C:\\Anaconda\\Library\\bin', 'C:\\Anaconda\\Scripts', '%USERPROFILE%\\AppData\\Local\\Microsoft\\WindowsApps']

Yet, if I start IDLE (old installation), I can import OpenCV (import cv2), but not from spyder.... How could I fix this?

Thanks !

You have two versions of python on your computer, so packages installed using your older version of pip won't show up for the anaconda installation.

Chances are you may want to keep both installs, so you could just install desired anaconda packages by running conda install packageName from your command prompt or terminal. However, these newly installed packages will only be available in anaconda/python, not your IDLE/python.

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