DEEPLABCUT(wxPython)两种安装方法 及报错及解决方案

目录

 安装完成后在DEEPLABCUT环境中再安装wxPython

方式一:基于deeplabcut.yaml安装

方式二:自定义安装(推荐)

解决方案


 方式一:基于deeplabcut.yaml安装

 安装完成后在DEEPLABCUT环境中再安装wxPython

Collecting wxPython
  Using cached wxPython-4.2.0.tar.gz (71.0 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-5uk2eb70/wxpython_5fd93f95b49d4d92a0766d020623c27a/setup.py", line 27, in <module>
          from buildtools.config import Config, msg, opj, runcmd, canGetSOName, getSOName
        File "/tmp/pip-install-5uk2eb70/wxpython_5fd93f95b49d4d92a0766d020623c27a/buildtools/config.py", line 30, in <module>
          from attrdict import AttrDict
      ModuleNotFoundError: No module named 'attrdict'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
(DEEPLABCUT) tuolong@tuolong-Lenovo-Legion-5-15IMH05H:~/project/DeepLabCut$ pip install -U importlib_metadata
Requirement already satisfied: importlib_metadata in /home/tuolong/anaconda3/envs/DEEPLABCUT/lib/python3.8/site-packages (4.11.4)
Collecting importlib_metadata
  Downloading importlib_metadata-4.12.0-py3-none-any.whl (21 kB)
Requirement already satisfied: zipp>=0.5 in /home/tuolong/anaconda3/envs/DEEPLABCUT/lib/python3.8/site-packages (from importlib_metadata) (3.8.1)
Installing collected packages: importlib_metadata
  Attempting uninstall: importlib_metadata
    Found existing installation: importlib-metadata 4.11.4
    Uninstalling importlib-metadata-4.11.4:
      Successfully uninstalled importlib-metadata-4.11.4
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
numba 0.56.2 requires setuptools<60, but you have setuptools 63.4.1 which is incompatible.
Successfully installed importlib_metadata-4.12.0
(DEEPLABCUT) tuolong@tuolong-Lenovo-Legion-5-15IMH05H:~/project/DeepLabCut$ pip uninstall importlib_metadata
Found existing installation: importlib-metadata 4.12.0
Uninstalling importlib-metadata-4.12.0:
  Would remove:
    /home/tuolong/anaconda3/envs/DEEPLABCUT/lib/python3.8/site-packages/importlib_metadata-4.12.0.dist-info/*
    /home/tuolong/anaconda3/envs/DEEPLABCUT/lib/python3.8/site-packages/importlib_metadata/*
Proceed (Y/n)? n
(DEEPLABCUT) tuolong@tuolong-Lenovo-Legion-5-15IMH05H:~/project/DeepLabCut$ pip install -U wxPython
Collecting wxPython
  Using cached wxPython-4.2.0.tar.gz (71.0 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-w7hp572v/wxpython_5bac12bd150c4d59902a1c48e31f17b2/setup.py", line 27, in <module>
          from buildtools.config import Config, msg, opj, runcmd, canGetSOName, getSOName
        File "/tmp/pip-install-w7hp572v/wxpython_5bac12bd150c4d59902a1c48e31f17b2/buildtools/config.py", line 30, in <module>
          from attrdict import AttrDict
      ModuleNotFoundError: No module named 'attrdict'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

解决方案

pip install attrdit
#再装一下wxPython,如果还装不上
sudo apt install -y doxygen
sudo apt install -y graphviz
python3 -m pip install wxPython
pip install wheel
pip install nes-py
pip install Cmake
pip install nes-py --no-cache-dir
pip install sip==5.5.0
pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04 wxPython

 

方式二:自定义安装

配置介绍:

python==3.8

tensorflow==2.5

cuda==11.2

cudnn==8.2

(默认annaconda 已经安装,以及显卡驱动)

2.1:创建annaconda 虚拟环境

conda create -n dlc python=3.8
source activate
conda activate dlc

 2.2:安装tensorflow(安装时记得查看对应的cuda 版本) 

pip install tensorflow==2.5

2.3:安装deeplabcut 

pip install deeplabcut

 2.4:安装wxPython

conda install -c conda-forge wxpython

小贴士:ubuntu20.4此处pip安装容易报错 (pip install wxpython)

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值