$ python setup.py install
报错:
源代码:
# /home/xxx/miniconda3/envs/autoshape/lib/python3.6/site-packages/setuptools/command/easy_install.py
metadata = EggMetadata(zipimport.zipimporter(egg_path))
解决:
# 解压
$ cd ./dist
$ sudo unzip -qq iou3d-0.0.0-py3.6-linux-x86_64.egg
$ cd ../
# 重命名
$ sudo cp dist/iou3d-0.0.0-py3.6-linux-x86_64.egg dist/iou3d-0.0.0-py3.6-linux-x86_64.zip
$ sudo vi /home/xxx/miniconda3/envs/autoshape/lib/python3.6/site-packages/setuptools/command/easy_install.py# 将 metadata = EggMetadata(zipimport.zipimporter(egg_path))
# 改为
import sys
sys.path.insert(0, '/home/xxx/AutoShape-main/pytorch/src/lib/utils/iou3d/dist/')
sys.path.append('/home/xxx/AutoShape-main/pytorch/src/lib/utils/iou3d/dist/')
# metadata = EggMetadata(zipimport.zipimporter(egg_path))
metadata = EggMetadata(zipimport.zipimporter('/home/xxx/AutoShape-main/pytorch/src/lib/utils/iou3d/dist/iou3d-0.0.0-py3.6-linux-x86_64.zip'))