Résolue

Je n'ai pas ce que vous avez dans le terminal mais j'ai plutot ça

# Ligne de commande # Système d'exploitation

Windows PowerShell

Copyright (C) Microsoft Corporation. Tous droits réservés.


Installez la dernière version de PowerShell pour de nouvelles fonctionnalités et améliorations ! https

://aka.ms/PSWindows


PS C:\Users\hosse> & "C:/Program Files/Python36/python.exe" c:/Users/hosse/python

Hello

PS C:\Users\hosse> & "C:/Program Files/Python36/python.exe" -m pip install -U autopep8

Collecting autopep8

 Using cached https://files.pythonhosted.org/packages/82/f8/9cc97232fb1612327525903296f5e4d8ba1c4acc3

469c18afdeba839ce62/autopep8-2.0.1-py2.py3-none-any.whl

Collecting pycodestyle>=2.10.0 (from autopep8)

 Using cached https://files.pythonhosted.org/packages/a2/54/001fdc0d69e8d0bb86c3423a6fa6dfada8cc26317

c2635ab543e9ac411bd/pycodestyle-2.10.0-py2.py3-none-any.whl

Collecting tomli; python_version < "3.11" (from autopep8)

 Using cached https://files.pythonhosted.org/packages/05/e4/74f9440db36734d7ba83c574c1e7024009ce849208a41f90e94a134dc6d1/tomli-1.2.3-py3-none-any.whl

 Using cached https://files.pythonhosted.org/packages/05/e4/74f9440db36734d7ba83c574c1e7024009ce84920

8a41f90e94a134dc6d1/tomli-1.2.3-py3-none-any.whl               Installing collected packages: pycodestyle, tomli, autopep8

 Using cached https://files.pythonhosted.org/packages/05/e4/74f9440db36734d7ba83c574c1e7024009ce849208a41f90e94a134dc6d1/tomli-1.2.3-py3-none-a

ny.whl

Installing collected packages: pycodestyle, tomli, autopep8

Could not install packages due to an EnvironmentError: [Errno 13] Permis

sion denied: 'C:\\Program Files\\Python36\\Lib\\site-packages\\pycodesty

le.py'Consider using the `--user` option or check the permissions.

You are using pip v& "C:/Program Files/Python36/python.exe" c:/Users/hos

se/formationonsider upgrading via the 'python -m pip install --upgrade p

Helloommand.

Hello\Users\hosse> & "C:/Program Files/Python36/python.exe" c:/Users/hos

Hellormatio

PS C:\Users\hosse> & "C:/Program Files/Python36/python.exe" -m pip insta

ll -U autopep8

Collecting autopep8

 Using cached https://files.pythonhosted.org/packages/82/f8/9cc97232fb1

612327525903296f5e4d8ba1c4acc3469c18afdeba839ce62/autopep8-2.0.1-py2.py3

-none-any.whl

Collecting pycodestyle>=2.10.0 (from autopep8)

 Using cached https://files.pythonhosted.org/packages/a2/54/001fdc0d69e

8d0bb86c3423a6fa6dfada8cc26317c2635ab543e9ac411bd/pycodestyle-2.10.0-py2

.py3-none-any.whl

Collecting tomli; python_version < "3.11" (from autopep8)

 Using cached https://files.pythonhosted.org/packages/05/e4/74f9440db36

734d7ba83c574c1e7024009ce849208a41f90e94a134dc6d1/tomli-1.2.3-py3-none-a

ny.whl

Installing collected packages: pycodestyle, tomli, autopep8

Could not install packages due to an EnvironmentError: [Errno 13] Permis

sion denied: 'C:\\Program Files\\Python36\\Lib\\site-packages\\pycodesty

le.py'

Consider using the `--user` option or check the permissions.


You are using pip version 18.1, however version 21.3.1 is available.

You should consider upgrading via the 'python -m pip install --upgrade p

ip' command.

PS C:\Users\hosse>

Thibault houdon

Mentor

Bonjour Hossein,


Ça me semble bon, quand tu lances ton script le "Hello" est bien affiché.


Par la suite tu lances l'installation d'un module (autopep8) avec pip et l'installation ne fonctionne pas car tu n'as pas les permissions. Dans ce cas je te conseille de lancer ton terminal en tant qu'administrateur pour éviter ces problèmes de permission sur Windows.


Je te conseille également d'utiliser les terminaux que je recommande pour Windows (Git Bash ou Cmder). Comme ça tu auras exactement les mêmes commandes que moi sur un terminal Bash :)

Inscris-toi

(c'est gratuit !)

Inscris-toi

Tu dois créer un compte pour participer aux discussions.

Créer un compte

Rechercher sur le site

Formulaire de contact

Inscris-toi à Docstring

Pour commencer ton apprentissage.

Tu as déjà un compte ? Connecte-toi.