Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] cannot pip install mmpretrain on Python3.6 conda enviroment #2277

Closed
3 tasks
zhanghui-china opened this issue Jul 13, 2023 · 3 comments
Closed
3 tasks
Assignees

Comments

@zhanghui-china
Copy link

zhanghui-china commented Jul 13, 2023

Checklist

  • I have searched related issues but cannot get the expected help.
  • 2. I have read the FAQ documentation but cannot get the expected help.
  • 3. The bug has not been fixed in the latest version.

Describe the bug

my board is Rock5a , RK3588

python tools/deploy.py
configs/mmpretrain/classification_rknn-int8_static-224x224.py
~/mmpretrain/configs/resnet/resnet50_8xb32_in1k.py
/resnet50_batch256_imagenet_20200708-cfb998bf.pth
~/mmpretrain/demo/demo.JPEG
--work-dir mmdeploy_models/mmpretrain/resnet50
--device cpu
--dump-info

when i execute model convert from onnx to rknn:

Reproduction

(rock36) rock@ubuntu:~/mmdeploy$ sh ./rknn_resnet50.sh
Traceback (most recent call last):
  File "tools/deploy.py", line 335, in <module>
    main()
  File "tools/deploy.py", line 134, in main
    device=args.device)
  File "/home/rock/mmdeploy/mmdeploy/backend/sdk/export_info.py", line 352, in export2SDK
    deploy_info = get_deploy(deploy_cfg, model_cfg, work_dir, device)
  File "/home/rock/mmdeploy/mmdeploy/backend/sdk/export_info.py", line 268, in get_deploy
    deploy_cfg, model_cfg, work_dir=work_dir, device=device)
  File "/home/rock/mmdeploy/mmdeploy/backend/sdk/export_info.py", line 62, in get_model_name_customs
    model_cfg=model_cfg, deploy_cfg=deploy_cfg, device=device)
  File "/home/rock/mmdeploy/mmdeploy/apis/utils/utils.py", line 46, in build_task_processor
    import_codebase(codebase_type, custom_module_list)
  File "/home/rock/mmdeploy/mmdeploy/codebase/__init__.py", line 31, in import_codebase
    raise ImportError(f'{lib} has not been installed. '
ImportError: mmpretrain has not been installed. Import mmpretrain failed.
(rock36) rock@ubuntu:~/mmdeploy$ pip install mmpretrain
ERROR: Could not find a version that satisfies the requirement mmpretrain (from versions: none)
ERROR: No matching distribution found for mmpretrain

Environment

Ubuntu 18.04 LTS X86
gcc 7.5.0
conda python 3.6
MMDEPLOY_DIR=~/mmdeploy
ONNXRUNTIME_DIR=onnxruntime-linux-x64-1.8.1
LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
pytorch 1.8.1
mmcv>=2.0.0rc2
rknn_toolkit2-1.4.0_22dcfef4-cp36-cp36m-linux_x86_64.whl
numpy 1.20.3

Error traceback

No response

@AllentDan AllentDan self-assigned this Jul 14, 2023
@AllentDan
Copy link
Member

If you have to install mmpretrain in a python 3.6 env, you can try building from source after modifying a little bit code.

@zhanghui-china
Copy link
Author

(rock36) rock@ubuntu:~$ pip list
Package Version Editable project location


addict 2.4.0
aenum 3.1.15
aliyun-python-sdk-core 2.13.36
aliyun-python-sdk-kms 2.16.1
certifi 2021.5.30
cffi 1.15.1
charset-normalizer 2.0.12
click 8.0.4
colorama 0.4.5
commonmark 0.9.1
crcmod 1.7
cryptography 40.0.2
cycler 0.11.0
dataclasses 0.8
dill 0.3.4
flatbuffers 23.5.26
grpcio 1.48.2
idna 3.4
importlib-metadata 4.8.3
importlib-resources 5.4.0
jmespath 0.10.0
kiwisolver 1.3.1
Markdown 3.3.7
matplotlib 3.3.4
mkl-fft 1.3.0
mkl-random 1.1.1
mkl-service 2.3.0
mmcv 2.0.0rc2
mmdeploy 1.2.0 /home/rock/mmdeploy
mmengine 0.4.0
model-index 0.1.11
multiprocess 0.70.12.2
numpy 1.19.5
olefile 0.46
onnx 1.8.1
onnxruntime 1.8.1
opencv-python 4.4.0.46
opendatalab 0.0.2
openmim 0.3.9
ordered-set 4.0.2
oss2 2.18.0
packaging 21.3
pandas 1.1.5
Pillow 8.3.1
pip 21.3.1
prettytable 2.5.0
protobuf 3.19.4
pycparser 2.21
pycryptodome 3.18.0
Pygments 2.14.0
pyparsing 3.1.0
python-dateutil 2.8.2
pytz 2023.3
PyYAML 6.0
requests 2.27.1
rich 12.6.0
rknn-toolkit2 1.4.0-22dcfef4
setuptools 58.0.4
six 1.16.0
tabulate 0.8.10
termcolor 1.1.0
terminaltables 3.1.10
torch 1.8.1
torchaudio 0.8.0a0+e4e171a
torchvision 0.9.1
tqdm 4.64.1
typing_extensions 4.1.1
urllib3 1.26.16
wcwidth 0.2.6
wheel 0.37.1
yapf 0.32.0
zipp 3.6.0

@AllentDan
Copy link
Member

Fixed in #2278

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants