win10下Anaconda虛擬環境安裝pycocotools

工程代碼中有這麼一句

from pycocotools.coco import COCO

需要我的anaconda虛擬環境下安裝了pycocotools庫;

 

step1:需要安裝visualcppbuildtools full.exe

下載地址:Microsoft Visual C++ Build Tools 2015.

下載後選擇默認安裝方式安裝下即可~

安裝後在Visual C++ Build Tools文件夾下找到Visual C++ 2015 x64 Native Building Tool Command Prompt;

 

Step2:安裝pycocotools

激活你要將這個pycocotools庫安裝的anaconda虛擬環境;

我這是用conda創建了個叫pytorch_gpu的環境,將pycocotools庫裝在這個環境下;

然後運行如下指令即可完成安裝:

pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI


主要參考:

https://blog.csdn.net/qq_28400629/article/details/85247087

https://github.com/maycuatroi/pycocotools-window

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章