这里写自定义目录标题
前面詳細的教程參考:https://blog.csdn.net/xuegreat1/article/details/141892867
懶得寫了,先寫遇到的一些教程外的bug:
- 上文教程走完后運行demo.py,但是發現沒有裝mayavi庫,直接安裝報錯:
(openpcdet) D:\OpenPCDet-master>conda install mayavi
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: /
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- mayavi -> python[version='2.7.*|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0']
Your python: python=3.8
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.
mayavi最高支持python3.7,但是我們已經裝了3.8,據説可以先安裝 vtk9.0.1 ,再安裝mayavi4.7.3,但是不行。
Building wheel for mayavi (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
C:\Users\SARI-IOT\AppData\Local\Temp\pip-install-m2p_hemq\mayavi_46ff52d75a4047a299ee1992c4694755\setup.py:13: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
from numpy.distutils.command import build, install_data
********************************************************************************
Numpy is required to build Mayavi correctly, please install it first.
********************************************************************************
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\SARI-IOT\AppData\Local\Temp\pip-install-m2p_hemq\mayavi_46ff52d75a4047a299ee1992c4694755\setup.py", line 406, in <module>
raise RuntimeError(msg)
RuntimeError:
Numpy is required to build Mayavi correctly, please install it first.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for mayavi
Running setup.py clean for mayavi
Failed to build mayavi
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (mayavi)
我的解決辦法是安裝vtk+pyQt5再安裝mayavi:
pip intsall vtk PyQt5 mayavi
vtk 9.0.1
PyQt5 5.15.11
PyQt5-Qt5 5.15.2
PyQt5_sip 12.15.0
mayavi 4.8.2
-
ModuleNotFoundError: No module named ‘configobj’
直接安裝configobj -
from . import _imaging as core
ImportError: DLL load failed while importing _imaging: 找不到指定的模块。
这个错误通常是因为 Pillow 在导入 _imaging 模块时找不到所需的 DLL 文件。需要重新安裝pillow,并且重啓pycharm生效
4。 同理,還有一個庫也出現了同樣的問題,不慌,更新安裝cumm就可以:
from cumm import tensorview as tv
File "C:\Users\SARI-IOT\anaconda3\envs\openpcdet\lib\site-packages\cumm\tensorview\__init__.py", line 27, in <module>
from cumm.core_cc import tensorview_bind
ImportError: DLL load failed while importing core_cc: 找不到指定的模块。
但是要結合下一個報錯來看,不知道什麽時候已經把spconv卸載了,那麽重新安裝吧,看來openpcdet編譯和spconv版本沒有很多關聯?
File "D:\OpenPCDet-master\pcdet\models\backbones_3d\spconv_backbone.py", line 30, in <module>
class SparseBasicBlock(spconv.SparseModule):
AttributeError: module 'spconv' has no attribute 'SparseModule'
仔細看我的cuda版本11.7,參考spconv的開源社區,pip install spconv-cu117,但是遇見一個路徑沒辦法訪問:
Downloading spconv_cu117-2.3.6-cp38-cp38-win_amd64.whl (66.3 MB)
---------------------------------------- 66.3/66.3 MB 1.9 MB/s eta 0:00:00
Downloading cumm_cu117-0.4.11-cp38-cp38-win_amd64.whl (1.2 MB)
---------------------------------------- 1.2/1.2 MB 1.9 MB/s eta 0:00:00
Installing collected packages: cumm-cu117, spconv-cu117
ERROR: Could not install packages due to an OSError: [WinError 5] 拒绝访问。: 'C:\\。。。\\anaconda3\\envs\\openpcdet\\Lib\\site-packages\\cumm\\core_cc.cp38-win_amd64.pyd'
Consider using the `--user` option or check the permissions.
管理員運行也沒用,直接:pip install --user cumm-cu117 spconv-cu117就可以,不行的話再試試C:\。。。\anaconda3\envs\openpcdet\Lib\site-packages把這個路徑取消只讀。
- 沒關係,就快好了:)。接下來遇到報錯:
File "D:\OpenPCDet-master\pcdet\models\model_utils\mppnet_utils.py", line 1, in <module>
from os import getgrouplist
ImportError: cannot import name 'getgrouplist' from 'os' (C:\Users\SARI-IOT\anaconda3\envs\openpcdet\lib\os.py)
我仔細看了一下,from os import getgrouplist這個庫后面的代碼沒有用到,直接注釋吧,跳過!
沒關係又活了一天~組會又有的匯報了,天天修環境,搞不出成果的苦命人。
哦我也成功啦: