megvii-research / PETR

[ECCV2022] PETR: Position Embedding Transformation for Multi-View 3D Object Detection & [ICCV2023] PETRv2: A Unified Framework for 3D Perception from Multi-Camera Images
Other
854 stars 132 forks source link

Package conflicts when installing mmdet3d (error: networkx 2.2 is installed but networkx>=2.8 is required by {'scikit-image'}) #124

Open da-qing-wa opened 1 year ago

da-qing-wa commented 1 year ago

Hi dear authors,

I encountered the following package conflicts while installing mmdet3d following the steps in the PETR/install.md file.

After I ran the command:

python3 setup.py develop

An error came up:

error: networkx 2.2 is installed but networkx>=2.8 is required by {'scikit-image'}

Here's my env info:

Package                 Version      Editable project location
----------------------- ------------ ------------------------------------------------------
absl-py                 1.4.0
addict                  2.4.0
contourpy               1.0.7
cycler                  0.11.0
Cython                  0.29.34
fonttools               4.39.4
google-auth             2.18.1
google-auth-oauthlib    1.0.0
grpcio                  1.55.0
imageio                 2.27.0
importlib-resources     5.12.0
kiwisolver              1.4.4
lazy_loader             0.2
lyft-dataset-sdk        0.0.8
Markdown                3.4.3
matplotlib              3.7.1
mkl-fft                 1.3.1
mkl-random              1.2.2
mkl-service             2.4.0
mmcv-full               1.4.0
mmdet                   2.24.1       /home/q.du/workspace/3d_object_detection/mmdetection
mmdet3d                 0.17.1       /home/q.du/workspace/3d_object_detection/mmdetection3d
mmsegmentation          0.20.2
networkx                2.2
numba                   0.48.0
numpy                   1.24.3
nuscenes-devkit         1.1.10
olefile                 0.46
opencv-python           4.7.0.72
packaging               23.1
Pillow                  7.1.2
pip                     23.0.1
plyfile                 0.9
prettytable             3.7.0
protobuf                4.23.1
pycocotools             2.0.6
pyparsing               3.1.0b2
python-dateutil         2.8.2
PyWavelets              1.4.1
PyYAML                  6.0
requests                2.31.0
scikit-image            0.21.0rc1
scipy                   1.10.1
setuptools              66.0.0
six                     1.16.0
tensorboard             2.13.0
tensorboard-data-server 0.7.0
terminaltables          3.1.10
tifffile                2023.4.12
tomli                   2.0.1
torch                   1.9.1+cu111
torchaudio              0.9.1
torchvision             0.10.1+cu111
trimesh                 2.35.39
typing_extensions       4.6.1
wcwidth                 0.2.6
Werkzeug                2.3.4
wheel                   0.38.4
yapf                    0.33.0
zipp                    3.15.0

Any ideas about this problem? Any advice may help, thanks!

yingfei1016 commented 1 year ago

Hi, Here is my environment. The mmdet3d0.17 is old. If you encounter version problems, you can upgrade according to the prompts.

networkx==3.0 scikit-image==0.17.2 numpy==1.21.5 pandas==1.4.3

yingfei1016 commented 1 year ago

The more environment can be find here.

absl-py                           0.15.0
addict                            2.4.0
anyio                             3.6.1
appdirs                           1.4.4
argcomplete                       3.0.8
argon2-cffi                       21.3.0
argon2-cffi-bindings              21.2.0
asttokens                         2.0.8
astunparse                        1.6.3
async-timeout                     4.0.2
attrs                             19.3.0
av                                10.0.0
av2                               0.2.1
awscli                            1.25.90
Babel                             2.10.3
backcall                          0.2.0
beautifulsoup4                    4.11.1
bev-toolbox                       0.0                  /data/BEVPerception-Survey-Recipe
black                             23.1.0
bleach                            5.0.1
blinker                           1.4
boto3                             1.24.89
botocore                          1.27.89
bottle                            0.12.23
brainpp                           2.0.0
cachetools                        5.3.0
certifi                           2019.11.28
cffi                              1.15.1
chardet                           3.0.4
charset-normalizer                2.1.1
clang                             5.0
click                             8.1.3
cloud-init                        23.1.2
colorama                          0.4.4
colorlog                          6.7.0
configobj                         5.0.6
confluent-kafka                   2.0.2
contourpy                         1.0.5
cryptography                      2.8
cycler                            0.11.0
Cython                            0.29.14
dataclasses                       0.6
dbus-python                       1.2.16
debugpy                           1.6.3
decorator                         5.1.1
defusedxml                        0.7.1
Deprecated                        1.2.13
descartes                         1.1.0
dill                              0.3.5.1
distlib                           0.3.6
distro                            1.4.0
distro-info                       0.23ubuntu1
dm-tree                           0.1.8
docker-pycreds                    0.4.0
docutils                          0.16
dotmap                            1.3.30
dulwich                           0.21.3
einops                            0.6.0
elasticsearch                     7.17.9
entrypoints                       0.4
etils                             1.0.0
exceptiongroup                    1.1.0
executing                         1.1.0
fairscale                         0.4.13
fastjsonschema                    2.16.2
filelock                          3.12.0
fire                              0.5.0
flake8                            6.0.0
flash-attn                        0.2.8
Flask                             2.2.2
flatbuffers                       1.12
fonttools                         4.37.4
frozendict                        1.2
future                            0.18.2
fvcore                            0.1.5.post20221221
gast                              0.4.0
GeometricKernelAttention          1.0
gitdb                             4.0.10
gitignore-parser                  0.1.3
GitPython                         3.1.31
google-auth                       2.16.1
google-auth-oauthlib              0.4.6
google-pasta                      0.2.0
googleapis-common-protos          1.58.0
graph-compression-google-research 0.0.4
graphviz                          0.20.1
grep                              0.3.2
grpcio                            1.51.3
h5py                              3.1.0
idna                              2.8
imageio                           2.25.1
importlib-metadata                5.0.0
importlib-resources               5.12.0
influxdb                          5.3.1
iniconfig                         2.0.0
iopath                            0.1.10
ipykernel                         6.16.0
ipython                           8.5.0
ipython-genutils                  0.2.0
ipywidgets                        8.0.4
itsdangerous                      2.1.2
jedi                              0.18.2
Jinja2                            3.1.2
jmespath                          1.0.1
joblib                            1.2.0
json5                             0.9.10
jsonpatch                         1.22
jsonpointer                       2.0
jsonschema                        3.2.0
jupyter                           1.0.0
jupyter_client                    7.3.5
jupyter-console                   6.6.1
jupyter_core                      5.2.0
jupyter-http-over-ws              0.0.8
jupyter-server                    1.19.1
jupyterlab                        3.4.8
jupyterlab-drawio                 0.9.0
jupyterlab-pygments               0.2.2
jupyterlab_server                 2.15.2
jupyterlab-widgets                3.0.5
keras                             2.10.0
keras-nightly                     2.5.0.dev2021032900
Keras-Preprocessing               1.1.2
kiwisolver                        1.4.4
kubernetes                        26.1.0
labserver                         0.1.1
lingvo                            0.10.0
llvmlite                          0.31.0
lmdb                              1.3.0
lyft-dataset-sdk                  0.0.8
Markdown                          3.4.1
markdown-it-py                    2.2.0
MarkupSafe                        2.1.1
matplotlib                        3.5.2
matplotlib-inline                 0.1.6
mccabe                            0.7.0
mdurl                             0.1.2
mistune                           2.0.4
mmcv-full                         1.4.1
mmdet                             2.19.0
mmdet3d                           0.17.2               /data/MapTR/mmdetection3d
mmsegmentation                    0.20.0
model-pruning-google-research     0.0.5
more-itertools                    4.2.0
motmetrics                        1.1.3
mpmath                            1.2.1
msgpack                           1.0.4
mypy-extensions                   1.0.0
nbclassic                         0.4.5
nbclient                          0.7.0
nbconvert                         7.2.1
nbformat                          5.6.1
nest-asyncio                      1.5.6
netifaces                         0.10.4
networkx                          3.0
nori2                             1.12.1
notebook                          6.4.12
notebook-shim                     0.1.0
nox                               2023.4.22
numba                             0.48.0
numpy                             1.21.5
nuscenes-devkit                   1.1.10
nvidia-cublas-cu11                11.10.3.66
nvidia-cuda-nvrtc-cu11            11.7.99
nvidia-cuda-runtime-cu11          11.7.99
nvidia-cudnn-cu11                 8.5.0.96
oauthlib                          3.1.0
ofed-le-utils                     1.0.3
opencv-python                     4.6.0.66
opt-einsum                        3.3.0
packaging                         23.0
pandas                            1.4.3
pandocfilters                     1.5.0
parso                             0.8.3
pathspec                          0.11.0
pathtools                         0.1.2
pexpect                           4.8.0
pickleshare                       0.7.5
Pillow                            9.2.0
pip                               23.0.1
platformdirs                      3.5.1
plotly                            5.13.1
pluggy                            1.0.0
plyfile                           0.7.4
portalocker                       2.7.0
prettytable                       3.6.0
prometheus-client                 0.14.1
promise                           2.3
prompt-toolkit                    3.0.31
protobuf                          3.19.6
psutil                            5.9.2
ptyprocess                        0.7.0
pure-eval                         0.2.2
pyarrow                           12.0.0
pyasn1                            0.4.8
pyasn1-modules                    0.2.8
pycocotools                       2.0.4
pycodestyle                       2.10.0
pycparser                         2.21
pyflakes                          3.0.1
Pygments                          2.13.0
PyGObject                         3.36.0
PyJWT                             1.7.1
PyOpenGL                          3.1.6
pyparsing                         3.0.9
pyproj                            3.5.0
pyquaternion                      0.9.9
pyrsistent                        0.15.5
pyserial                          3.4
pytest                            7.2.1
python-apt                        2.0.0+ubuntu0.20.4.8
python-dateutil                   2.8.2
python-distutils-extra            2.39
python-statemachine               1.0.3
pytz                              2022.4
PyWavelets                        1.4.1
PyYAML                            5.4.1
pyzmq                             24.0.1
qtconsole                         5.4.0
QtPy                              2.3.0
redis                             4.3.4
refile                            5.3.2
requests                          2.28.1
requests-futures                  1.0.0
requests-oauthlib                 1.3.1
requests-unixsocket               0.2.0
rich                              13.3.5
rsa                               4.7.2
s3transfer                        0.6.0
scikit-image                      0.17.2
scikit-learn                      1.1.2
scipy                             1.9.1
seaborn                           0.12.0
Send2Trash                        1.8.0
sentry-sdk                        1.17.0
setproctitle                      1.3.2
setuptools                        45.2.0
Shapely                           1.8.5.post1
six                               1.15.0
sklearn                           0.0
smart-open                        6.3.0
smmap                             5.0.0
sniffio                           1.3.0
soupsieve                         2.3.2.post1
ssh-import-id                     5.10
stack-data                        0.5.1
sympy                             1.11.1
tabulate                          0.9.0
tenacity                          8.2.1
tensorboard                       2.10.1
tensorboard-data-server           0.6.1
tensorboard-plugin-wit            1.8.1
tensorboardX                      2.5.1
tensorflow-datasets               4.8.2
tensorflow-estimator              2.11.0
tensorflow-gpu                    2.6.0
tensorflow-hub                    0.12.0
tensorflow-metadata               1.12.0
termcolor                         1.1.0
terminado                         0.16.0
terminaltables                    3.1.10
threadpoolctl                     3.1.0
tifffile                          2023.2.3
timm                              0.5.4
tinycss2                          1.1.1
toml                              0.10.2
tomli                             2.0.1
torch                             1.9.0+cu111
torchaudio                        0.9.0
torchvision                       0.10.0+cu111
tornado                           6.2
tqdm                              4.64.1
traitlets                         5.4.0
trimesh                           3.20.1
typeguard                         2.13.3
typing_extensions                 4.5.0
ujson                             5.7.0
unattended-upgrades               0.1
urllib3                           1.26.15
virtualenv                        20.23.0
waitress                          2.1.2
wandb                             0.14.0
waymo-open-dataset-tf-2-6-0       1.4.9
wcwidth                           0.2.5
webencodings                      0.5.1
websocket-client                  1.4.1
Werkzeug                          2.2.2
wheel                             0.37.1
widgetsnbextension                4.0.5
wrapt                             1.12.1
yacs                              0.1.8
yapf                              0.32.0
zipp                              3.15.0
yingfei1016 commented 1 year ago

The StreamPETR will more easy to install, it based on mmdet3dv1.0.

https://github.com/exiawsh/StreamPETR.git

da-qing-wa commented 1 year ago

Thanks for your reply! I tried to change the version of packages according to your advice (changed mmcv-full from 1.4.0 to 1.4.1, changed mmdet from 2.24.1 to 2.19.0, changed mmdet3d from 0.17.1 to 0.17.2), but still met the error when installing mmedt3d:

error: networkx 2.2 is installed but networkx>=2.8 is required by {'scikit-image'}

I installed with the following commands:

pip install mmcv-full==1.4.1 -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.9.0/index.html
git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
git checkout v2.19.0
pip install -r requirements/build.txt
python3 setup.py develop
cd ..
pinstall mmsegmentation==0.20.2
git clone  https://github.com/open-mmlab/mmdetection3d.git
cd mmdetection3d
git checkout v0.17.2
pip install -r requirements/build.txt
python3 setup.py develop
cd ..
da-qing-wa commented 1 year ago

and here's my current env:

Package                 Version      Editable project location
----------------------- ------------ ------------------------------------------------------
absl-py                 1.4.0
addict                  2.4.0
contourpy               1.0.7
cycler                  0.11.0
Cython                  0.29.35
fonttools               4.39.4
google-auth             2.19.0
google-auth-oauthlib    1.0.0
grpcio                  1.55.0
imageio                 2.27.0
importlib-resources     5.12.0
kiwisolver              1.4.4
lazy_loader             0.2
lyft-dataset-sdk        0.0.8
Markdown                3.4.3
matplotlib              3.7.1
mmcv-full               1.4.1
mmdet                   2.19.0       /home/q.du/workspace/3d_object_detection/mmdetection
mmdet3d                 0.17.2       /home/q.du/workspace/3d_object_detection/mmdetection3d
mmsegmentation          0.20.2
networkx                2.2
numba                   0.48.0
numpy                   1.24.3
nuscenes-devkit         1.1.10
opencv-python           4.7.0.72
packaging               23.1
Pillow                  9.5.0
pip                     23.0.1
plyfile                 0.9
prettytable             3.7.0
protobuf                4.23.1
pycocotools             2.0.6
pyparsing               3.1.0b2
python-dateutil         2.8.2
PyWavelets              1.4.1
PyYAML                  6.0
requests                2.31.0
scikit-image            0.21.0rc1
scipy                   1.10.1
setuptools              66.0.0
six                     1.16.0
tensorboard             2.13.0
tensorboard-data-server 0.7.0
terminaltables          3.1.10
tifffile                2023.4.12
tomli                   2.0.1
torch                   1.9.1+cu111
torchaudio              0.9.1
torchvision             0.10.1+cu111
trimesh                 2.35.39
typing_extensions       4.6.2
wcwidth                 0.2.6
Werkzeug                2.3.4
wheel                   0.38.4
yapf                    0.33.0
zipp                    3.15.0
da-qing-wa commented 1 year ago

Hi, Here is my environment. The mmdet3d0.17 is old. If you encounter version problems, you can upgrade according to the prompts.

networkx==3.0 scikit-image==0.17.2 numpy==1.21.5 pandas==1.4.3

Additionally, a warning said:

mmdet3d 0.17.2 requires networkx<2.3,>=2.2, but you have networkx 3.0 which is incompatible.
mmdet3d 0.17.2 requires numpy<1.20.0, but you have numpy 1.21.5 which is incompatible.
samueleruffino99 commented 6 months ago

I have the same issue!

samueleruffino99 commented 6 months ago

When encountering this issue, I have run:

pip install scikit-image==0.18.3
pip install matplotlib==3.5.3
pip install cachetools descartes fire black flake8 pandas plotly pytest

and it was at least built.