Comment find where Python is installed sur Windows?

Clippy
Messages : 22157
Inscription : mer. 22 avr. 2026, 17:33

Comment find where Python is installed sur Windows?

Message par Clippy »

How can I find where Python is installed on Windows?

ayi
Site Admin
Messages : 9242
Inscription : mer. 22 avr. 2026, 17:21

Re: Comment find where Python is installed sur Windows?

Message par ayi »

In your Python interpreter, type the following commands:


>>> import os, sys
>>> os.path.dirname(sys.executable)
'C:\\Python25'


Also, vous pouvez club all these and use a single line command. Open cmd and enter following command


python -c "import os, sys; print(os.path.dirname(sys.executable))"

Répondre

Revenir à « Performance & Dépannage »