距离上次更新已经过了 363 天,文中部分内容可能已经过时,如有疑问,请在下方留言。

linux安装wxpython及odfpy

一、setuptools安装

pip install setuptools==50.3.2
Bash
(suibian) gaoyang@litao-3090:~/milvus$ pip install setuptools==50.3.2
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting setuptools==50.3.2
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/6d/38/c21ef5034684ffc0412deefbb07d66678332290c14bb5269c85145fbd55e/setuptools-50.3.2-py3-none-any.whl (785 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 785.2/785.2 kB 5.0 MB/s eta 0:00:00
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 68.2.2
    Uninstalling setuptools-68.2.2:
      Successfully uninstalled setuptools-68.2.2
Successfully installed setuptools-50.3.2
Bash

二、testresources安装

pip install testresources
Bash
(suibian) gaoyang@litao-3090:~/milvus$ pip install testresources
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting testresources
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/45/4d/79a9a1f71de22fbc6c6433ac135f68d005de72fbe73e2137d2e77da9252c/testresources-2.0.1-py2.py3-none-any.whl (36 kB)
Collecting pbr>=1.8 (from testresources)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/64/dd/171c9fb653591cf265bcc89c436eec75c9bde3dec921cc236fa71e5698df/pbr-6.0.0-py2.py3-none-any.whl (107 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 107.5/107.5 kB 2.6 MB/s eta 0:00:00
Installing collected packages: pbr, testresources
Successfully installed pbr-6.0.0 testresources-2.0.1
Bash

三、launchpadlib安装

python3 -m pip install launchpadlib
Bash
(suibian) gaoyang@litao-3090:~/milvus$ python3 -m pip install launchpadlib
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting launchpadlib
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/b5/e7/06e419bdac7f7d45b99730af71a069731d453531ef5f00d06a36f6c8b87d/launchpadlib-1.11.0-py2.py3-none-any.whl (217 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 217.7/217.7 kB 1.4 MB/s eta 0:00:00
Collecting httplib2 (from launchpadlib)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a8/6c/d2fbdaaa5959339d53ba38e94c123e4e84b8fbc4b84beb0e70d7c1608486/httplib2-0.22.0-py3-none-any.whl (96 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.9/96.9 kB 2.8 MB/s eta 0:00:00
Collecting lazr.restfulclient>=0.14.2 (from launchpadlib)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/6f/de/0588cc50519e5b7ec75742d3e7cb7234298c95ef580b97f0ed3ac8fbc891/lazr.restfulclient-0.14.6-py2.py3-none-any.whl (67 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 67.4/67.4 kB 2.4 MB/s eta 0:00:00
Collecting lazr.uri (from launchpadlib)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a6/db/310eaccd3639f5a8a6011c3133bb1cac7fd80bb46f8a50406df2966302e4/lazr.uri-1.0.6.tar.gz (18 kB)
  Preparing metadata (setup.py) ... done
Collecting six (from launchpadlib)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting distro (from lazr.restfulclient>=0.14.2->launchpadlib)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/12/b3/231ffd4ab1fc9d679809f356cebee130ac7daa00d6d6f3206dd4fd137e9e/distro-1.9.0-py3-none-any.whl (20 kB)
Collecting oauthlib (from lazr.restfulclient>=0.14.2->launchpadlib)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/7e/80/cab10959dc1faead58dc8384a781dfbf93cb4d33d50988f7a69f1b7c9bbe/oauthlib-3.2.2-py3-none-any.whl (151 kB)
Requirement already satisfied: setuptools in /home/gaoyang/.conda/envs/suibian/lib/python3.10/site-packages (from lazr.restfulclient>=0.14.2->launchpadlib) (50.3.2)
Collecting wadllib>=1.1.4 (from lazr.restfulclient>=0.14.2->launchpadlib)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/35/07/040cc4cc736cdf25873848bd4c717cc25e257196a7c11f42b3a09617a961/wadllib-1.3.6.tar.gz (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.2/62.2 kB 1.2 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting pyparsing!=3.0.0,!=3.0.1,!=3.0.2,!=3.0.3,<4,>=2.4.2 (from httplib2->launchpadlib)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/9d/ea/6d76df31432a0e6fdf81681a895f009a4bb47b3c39036db3e1b528191d52/pyparsing-3.1.2-py3-none-any.whl (103 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 103.2/103.2 kB 2.5 MB/s eta 0:00:00
Building wheels for collected packages: lazr.uri, wadllib
  Building wheel for lazr.uri (setup.py) ... done
  Created wheel for lazr.uri: filename=lazr.uri-1.0.6-py3-none-any.whl size=20362 sha256=2a3f7a09d8313692b63221719b0fb71de7fb112cbb75a61080d29f926b0a6e8d
  Stored in directory: /home/gaoyang/.cache/pip/wheels/ff/a0/22/9807c4f1d8b81b56b86e489c0cf3aecf0321dfbb516a24919c
  Building wheel for wadllib (setup.py) ... done
  Created wheel for wadllib: filename=wadllib-1.3.6-py3-none-any.whl size=58278 sha256=d6b9bf1d720cf6dc5ca37f4d025df9f5d9e9c726cdc40b856e3dbcfd96ccef91
  Stored in directory: /home/gaoyang/.cache/pip/wheels/30/73/fc/e02d5f584d5ff57010f0e8620793a3d01cb49cb0581753ad1b
Successfully built lazr.uri wadllib
Installing collected packages: six, pyparsing, oauthlib, lazr.uri, distro, wadllib, httplib2, lazr.restfulclient, launchpadlib
Successfully installed distro-1.9.0 httplib2-0.22.0 launchpadlib-1.11.0 lazr.restfulclient-0.14.6 lazr.uri-1.0.6 oauthlib-3.2.2 pyparsing-3.1.2 six-1.16.0 wadllib-1.3.6
Bash

四、获取Ubuntu版本信息

cat /proc/version
Bash
Linux version 5.15.0-97-generic (buildd@lcy02-amd64-102) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #107~20.04.1-Ubuntu SMP Fri Feb 9 14:20:11 UTC 2024
Bash

五、安装wxPython

pip3 install -U  -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04  wxPython
Bash
pip3 install -U  wxPython-4.2.1-cp310-cp310-linux_x86_64.whl 
Bash
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing ./wxPython-4.2.1-cp310-cp310-linux_x86_64.whl
Requirement already satisfied: pillow in /home/gaoyang/.local/lib/python3.10/site-packages (from wxPython==4.2.1) (10.2.0)
Requirement already satisfied: six in /home/gaoyang/.conda/envs/suibian/lib/python3.10/site-packages (from wxPython==4.2.1) (1.16.0)
Requirement already satisfied: numpy in /home/gaoyang/.local/lib/python3.10/site-packages (from wxPython==4.2.1) (1.26.4)
Installing collected packages: wxPython
Successfully installed wxPython-4.2.1
Bash

六、odfpy安装

pip install odfpy
Bash

下面以代码进行示例

import odf.opendocument
import odf.text
import odf.draw
Bash

这个里面的odf在环境安装时需要安装odfpy,不能直接安装odf

文章作者: MakerGao
版权声明: 本站所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 MakerGao
喜欢就支持一下吧