python关于error: invalid command 'bdist_wheel报错的解决

Python在打包成whl文件时,

使用命令:python setup.py sdist bdist_wheel

时报错:error: invalid command 'bdist_wheel

执行完这句即可解决!pip3 install wheel

最近在玩RaspBerry Pico 时 thonny 有一个插件thonny_rpi_pico-0.2-py3-none-any.whl

根据网上提供的地址:https://github.com/raspberrypi/thonny-pico/releases/download/v0.2/thonny_rpi_pico-0.2-py3-none-any.whl(已失效)

已经找不到了,下载不了现成的文件了,只有直接编译了。

源文件项目可以在这里下载:

https://github.com/philouvb/thonny-pico/

https://github.com/JHP4911/thonny-pico

这两个项目是一样的。

下载zip包,然后就可以直接打包成whl文件。

第一步:下载得到:thonny-pico-master.zip

第二步:解压缩包得到 thonny-pico-master文件夹

第三步:打包成whl文件,这里要先安装好Python ,其次要安装wheel,在cmd或者powersheel中,使用命令:pip3 install wheel

              最后cd qie切换到 thonny-pico-master文件夹下,使用命令:python setup.py sdist bdist_wheel

第四步:在命令执行完成后,在当前项目包问价夹下有一个dist文件夹,里面就是打包好的thonny_rpi_pico-0.2-py3-none-any.whl文件了。

posted @ 2021-05-12 22:46  koomee  阅读(3410)  评论(0编辑  收藏  举报