I am using python 3.5.0 where "pip intall python" command for installing "Matplotlib" is not working. Here is the error that i get:
C:\>pip install matplotlib
Traceback (most recent call last):
File "c:\program files\python 3.5\lib\runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "c:\program files\python 3.5\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Program Files\Python 3.5\Scripts\pip.exe\__main__.py", line 5, in <module>
File "c:\program files\python 3.5\lib\site-packages\pip\_internal\cli\main.py", line 57
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax
CodePudding user response:
type pip install matplotlib
into cmd
if that doesn't work, ensure ...\python\scripts\ folder is in your PATH
open your scripts folder and ensure there is a pip.exe in there
try this in CMD
cd c:\users\blah\blah\Python\Scripts
.\pip.exe install matplotlib
CodePudding user response:
I tried all solutions that i got on stackoverflow but nothing seemed to be working for python 3.5.0, indeed the problem was resolved when i updated my python version to the latest release of python 3.9.7
CodePudding user response:
I think you need to upgrade pip first using following command in cmd as admin:
python -m pip install --upgrade pip then try this command: pip install matplotlib
CodePudding user response:
You should try: python -m pip install matplotlib
in a cmd prompt (run as admin).