删除 Docs/2024-11-14/Image/UPBOT-Tool环境配置和运行.md
parent
7cddfe0e11
commit
f02aed8f6c
|
@ -1,91 +0,0 @@
|
|||
UPBOT-Tool环境配置和运行
|
||||
|
||||
1.anaconda prompt创建虚拟环境
|
||||
|
||||
参考:[使用Pycharm和Anaconda配置Python环境图文详解教程——小白逐步操作版_pycharm anaconda配置-CSDN博客](https://blog.csdn.net/loushangfengjing/article/details/136639396)
|
||||
|
||||
conda create -n upbot python=3.7
|
||||
|
||||

|
||||
|
||||
激活新的环境,并验证:
|
||||
|
||||

|
||||
|
||||
在pycharm中打开项目:
|
||||
|
||||

|
||||
|
||||
选择虚拟环境:file->setting->project:upbot->python interpreter
|
||||
|
||||

|
||||
|
||||
选择show all,然后:
|
||||
|
||||

|
||||
|
||||
选择自己刚刚创建的虚拟环境:
|
||||
|
||||

|
||||
|
||||
此时就已经配置好了。
|
||||
|
||||
安装pyqt5:
|
||||
|
||||
在anaconda prompt输入:
|
||||
|
||||
pip install PyQt5 -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
|
||||
pip install PyQt5-tools -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
|
||||
使用清华源的时候建议把clash关掉,不然可能会出现问题。
|
||||
|
||||
看到pycharm中正在加载:
|
||||
|
||||

|
||||
|
||||
此时已经下载完成。
|
||||
|
||||
|
||||
|
||||
下载pyserial:
|
||||
|
||||
在anaconda prompt中输入:
|
||||
|
||||
conda install -c anaconda pyserial
|
||||
|
||||

|
||||
|
||||
pip list查看:
|
||||
|
||||

|
||||
|
||||
导出:pip freeze > ./requirements.txt
|
||||
|
||||

|
||||
|
||||
尝试启动,此时在main.py中修改端口,我的环境中是COM6:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
但是app.py无法正常运行,提示缺少qdarkstyle软件包:
|
||||
|
||||

|
||||
|
||||
在anaconda prompt中安装即可:conda install -c anaconda qdarkstyle
|
||||
|
||||
又遇到了bug:
|
||||
|
||||

|
||||
|
||||
是因为之前打开了main.py会占用端口,关闭main.py既可以了。
|
||||
|
||||
在弹出的页面中调整motor1,2 可以使两个轮子运动:
|
||||
|
||||

|
||||
|
||||
motor1为左轮,motor2为右轮。
|
Loading…
Reference in New Issue