How do I get a list of Python modules installed on my computer?
评论
help('modules')
in a Python shell/prompt.
评论
where python3
C:\Users\clu\AppData\Local\Microsoft\WindowsApps\python3.exe
where pip3
C:\Users\clu\AppData\Local\Programs\Python\Python310\Scripts\pip3.exe
我擦,开始菜单调出来的python,是在
"C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\python.exe"
打开vs的安装包,然后把Python环境那个去掉。
查看Python命令行所在的路径
>>> import os
>>> os.getcwd()
'C:\\Users\\clu\\AppData\\Local\\Programs\\Python\\Python310'
in a Python shell/prompt.
评论
python -c 'help("modules")'
>>> os.getcwd()
'C:\\Users\\clu\\AppData\\Local\\Programs\\Python\\Python310'