利用命令行在Anaconda Prompt 安裝PIL
利用命令conda install PIL出現問題如下:
(D:\Program Files\Anaconda3) C:\Users\lee>conda install PIL
Fetching package metadata ...........
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
- pil -> python 2.6*
- python 3.5*
Use "conda info <package>" to see the dependencies for each package.
根據錯誤提示:pil按照默認源的配置是沒有提供依賴Python3.5的包
解決方案:
1.創建一個新的Python2.6環境安裝
conda create -n python2.6 pil
activate python2.6 #進入該環境
conda install pil #安裝pil包
deactivate #退出該環境
2.創建一個新的基於python3.5 pil 的環境
conda create -n python3.5 -c menpo pil
activate python3.5 #進入該環境
conda install pil #安裝pil包
deactivate #退出該環境