1

I tried to install new packages, for example by executing : ! pip install ggplot

But when I do this, I get an error :

PermissionError: [WinError 5] Accès refusé: 'C:\\Program Files\\Anaconda3\\Lib\\site-packages\\brewer2mpl'
You are using pip version 8.1.2, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

So I tried to execute as they ask :

python -m pip install --upgrade pip

Then I get this error :

SyntaxError: invalid syntax (<ipython-input-8-93493bbcf27f>, line 1)
  File "<ipython-input-8-93493bbcf27f>", line 1
    python -m pip install --upgrade pip
                ^
SyntaxError: invalid syntax

Is there anyone who knows where I did wrong ?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Elise1369
  • 259
  • 1
  • 6
  • 19
  • 2
    You typed in a command-line command *into a Python shell*. It's not Python syntax, it's shell syntax. – Martijn Pieters Jun 24 '18 at 10:24
  • The upgrade message is just a warning, 'should consider' is not the same thing as 'must'. There is a PermissionError there, where you can't write to the `C:\\Program Files\\Anaconda3\\Lib\\site-packages` folder. That's not an error upgrading `pip` will solve, I'm afraid. – Martijn Pieters Jun 24 '18 at 10:25
  • @Vicrobot: they are on Windows, there is no 'root user' there. And I'm pretty sure pip 10.0.1 is fine, I'm not sure what you mean by there being a bug in that version. – Martijn Pieters Jun 24 '18 at 10:26
  • I've closed this as a duplicate of another question with the same problem: a `PermissionDenied` error when using `pip install` with Anaconda, on Windows. – Martijn Pieters Jun 24 '18 at 10:27
  • Ok, thank you very much ! – Elise1369 Jun 24 '18 at 11:49
  • Do you speak about this subject : https://stackoverflow.com/questions/31172719/pip-install-access-denied-on-windows ? Because I tried also to write "python -m pip install --upgrade pip" in cmd, but it doesn't work either – Elise1369 Jun 24 '18 at 11:50
  • (even if I change the directory to Python's directory) – Elise1369 Jun 24 '18 at 11:52
  • I’m sorry, I don’t have a Windows system at the moment to test on. I don’t know. – Martijn Pieters Jun 24 '18 at 11:53
  • Ok. Thank you for your answers. – Elise1369 Jun 24 '18 at 12:54

0 Answers0