文章目录
Python Learning Notes
1. Check Python Locations
1.1. Win10
下完安装好python后,想查看python的安装位置的几种方法
https://blog.youkuaiyun.com/weixin_62375676/article/details/127466029
按下Win+r(也就是命令提示符),输入cmd ,进入
1.1.1. Python Version
python -V
1.1.2. 查看当前python路径
where python
1.1.3. 利用sys.path查询Python安装地址
在cmd下,依次输入
pythonimport sysprint(sys.path)
2. 安装Library
2.1. install pywifi
在Win10中安装pywifi包
https://jingyan.baidu.com/article/a17d528555e7a0c199c8f261.html
以管理员模式打开Windows PowerShell,
python -m pip install pywifi
如果安装pywifi提示成功,但 import pywifi 不成功,则需要安装comtypes
python -m pip install comtypes
3. 打印print
3.1. 打印变量variable
print the variable a with 4 digits after the point
print(f"variable a = {a:.4f}")
本文介绍了在Windows10系统中检查Python安装位置的方法,包括使用命令行工具和`sys.path`。同时,详细讲解了如何通过pip安装pywifi库及其依赖comtypes。此外,还展示了如何打印带有小数点后四位的变量值。
2万+

被折叠的 条评论
为什么被折叠?



