-2

when I import matplotlib in my jupyter notebook it dose not work and this is its error:

enter image description here

can anyone help me what is wrong in my code?

Utpal Kumar
  • 300
  • 2
  • 13
mah
  • 1
  • 3

2 Answers2

1

enter image description hereTry these things on your Anaconda Prompt terminal:

  1. pip -V <- The version of pip will be displayed, if it is successfully installed on your system. Then we will try to upgrade it.
  2. pip install --upgrade pip <- do this to upgrade your pip, if it is already upgraded then it will show it.
  3. pip install matplotlib <- then write this command if still doesn't work let me know in the comments
mah
  • 1
  • 3
Anant Arun
  • 95
  • 7
  • in part 2 I have this error could not find the version that satisfies the requirements matplotlib – mah May 15 '21 at 08:05
  • pip install --upgrade pip <-this is for upgrading the PIP to the latest version, it is not related to maplotib. Can you show the image of point 1 and point 2 after writing the command and entering, by edit your answer above. – Anant Arun May 15 '21 at 08:36
  • This issue is related to some proxy, your firewall is not allowing pip to connect to the internet, so you need to allow pip from the windows firewall and it will work. I saw this somewhere, you need to use below proxy: HTTPS_PROXY=http://username:password@proxy.example.com:8080" https_proxy=http://username:password@proxy.example.com:8080" You might need to find where you have to set these proxy variables. – Anant Arun May 15 '21 at 10:23
  • yes that is right it was related to proxy .thanx – mah May 15 '21 at 10:52
0

have you even installed the lib? you can install it with python -m pip install -U matplotlib

wuffman
  • 11
  • 1