简体   繁体   中英

Problem with installing matplotlib library in pycharm

when i run

pip install matplotlib 

or

pip3 install matplotlib 

I get this error which i really don't understand. this has never happened before.

PS D:\Desktop\Reinforcement Learning> pip install matplotlib        
Collecting matplotlib
  Using cached matplotlib-3.5.2-cp310-cp310-win_amd64.whl (7.2 MB)
Requirement already satisfied: packaging>=20.0 in c:\users\ashis\appdata\local\programs\python\python31
0\lib\site-packages (from matplotlib) (21.3)
Requirement already satisfied: pyparsing>=2.2.1 in c:\users\ashis\appdata\local\programs\python\python3
10\lib\site-packages (from matplotlib) (3.0.9)
Requirement already satisfied: numpy>=1.17 in c:\users\ashis\appdata\local\programs\python\python310\li
b\site-packages (from matplotlib) (1.23.0)
Collecting cycler>=0.10
  Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting fonttools>=4.22.0
  Using cached fonttools-4.34.4-py3-none-any.whl (944 kB)
Requirement already satisfied: python-dateutil>=2.7 in c:\users\ashis\appdata\local\programs\python\pyt
hon310\lib\site-packages (from matplotlib) (2.8.2)
Requirement already satisfied: pillow>=6.2.0 in c:\users\ashis\appdata\local\programs\python\python310\
lib\site-packages (from matplotlib) (9.2.0)
Collecting kiwisolver>=1.0.1
  Using cached kiwisolver-1.4.3-cp310-cp310-win_amd64.whl (55 kB)
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'c:\\users\\a
shis\\appdata\\local\\programs\\python\\python310\\lib\\site-packages\\numpy-1.23.0.dist-info\\METADATA
'

Can anyone help me with this problem?

ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'c:\\users\\a
shis\\appdata\\local\\programs\\python\\python310\\lib\\site-packages\\numpy-1.23.0.dist-info\\METADATA
'

Since python got updated to 3.9 this might because of version. try to upgrade your matplolib using pip install --upgrade matplotlib

should work. if not try this as well

pip intstall pipwin
pipwin install <package name>

Hope this helps. If not please feel free to comment

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM