git專案學習筆記--FastMaskRCNN-master
FastMaskRCNN-master
https://github.com/CharlesShang/FastMaskRCNN/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
關於coco資料集的pycocotools/_mask.so: undefined symbol: _Py_ZeroStruct報錯問題
https://yq.aliyun.com/ziliao/583470
摘要: 本文講的是關於coco資料集的pycocotools/_mask.so: undefined symbol: _Py_ZeroStruct報錯問題, 最近在研究Mask RCNN分割問題遇到這個問題: pycocotools/_mask.so: undefined symbol: _Py_ZeroStruct 摸索了好久,百度,Google都試過,沒找到解
最近在研究Mask RCNN分割問題遇到這個問題:
pycocotools/_mask.so: undefined symbol: _Py_ZeroStruct
摸索了好久,百度,Google都試過,沒找到解決方法,最後自己想辦法,一步一步找bug,解決方法:
請注意Cython安裝位置,用python執行還是python3執行,都要有Cython才行,沒有請先安裝
第一步:
git clone https://github.com/pdollar/coco.git
第二步:
cd coco/PythonAPI
python setup.py build_ext --inplace
第三步:
sudo python setup.py build_ext install
經過上面三個步驟,已經安裝好了pycocotools到python庫了,進入python3命令列就可以直接匯入了,執行下面命令不報錯說明已經安裝成功了
>>> import pycocotools
後面很關鍵,download_and_convert_data.py中的原始碼是從lib資料夾匯入pycocotools,現在需要將所有從lib的相關匯入,如:
from libs.datasets.pycocotools.coco import COCO
改為從python庫匯入,如
from pycocotools.coco import COCO
(注意,需要修改的程式碼from libs.datasets.pycocotools.coco import COCO, 是在download_and_convert_coco.py檔案裡的。)
最後,執行python download_and_convert_data.py會執行成功。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setup.py install running install error: can't create or remove files in install directory
在執行python setup.py install 命令時出現以下錯誤提示:
setup.py install running install error: can't create or remove files in install directory
Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-2054.write-test'
解決辦法:
sudo python setup.py install
---------------------
作者:newHung
來源:CSDN
原文:https://blog.csdn.net/yuanya/article/details/38021665
版權宣告:本文為博主原創文章,轉載請附上博文連結!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pip 升級的問題解決辦法
今天在使用 python pip 安裝一個 python 包的時候,一直提示:
# pip install --upgrade pip
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
嘗試按說明執行 pip install --upgrade pip
,沒有任何報錯,但一直升級不成功,百思不得解。
解決辦法:升級命令: python -m pip install --upgrade pip
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
查詢已安裝的python包:python -m pip list