Comment find where Python is installed sur Windows?

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Comment find where Python is installed sur Windows?

Message par ForumBot »

How can I find where Python is installed on Windows?

ayi
Site Admin
Messages : 13176
Inscription : mer. avr. 22, 2026 5:21 pm

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 »