Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PIP Error
#1
Hello, I'm having an error when I try to run PIP. I've tried reinstalling Python but it didn't work. (I'm using Python 3.5 because my operating system is a Windows 7)

Error:
Error:
Traceback (most recent call last): File "c:\users\---\appdata\local\programs\python\python35-32\lib\runpy.py", line 170, in _run_module_as_main "__main__", mod_spec) File "c:\users\---\appdata\local\programs\python\python35-32\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\---\AppData\Local\Programs\Python\Python35-32\Scripts\pip.exe\__main__.py", line 5, in <module> File "c:\users\---\appdata\local\programs\python\python35-32\lib\site-packages\pip\_internal\cli\main.py", line 60 sys.stderr.write(f"ERROR: {exc}") ^ SyntaxError: invalid syntax
Sorry for bad English, I'm Brazilian
Reply
#2
pip 21.0 dropped support for 3.5 (note the f-string). You need to install pip < 21.0
check
https://stackoverflow.com/questions/6586...python-3-6
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
[deleted]. Sorry.
Reply
#4
(Mar-26-2021, 08:20 PM)buran Wrote: pip 21.0 dropped support for 3.5 (note the f-string). You need to install pip < 21.0
check
https://stackoverflow.com/questions/6586...python-3-6
Thanks!!!
Reply
#5
(Mar-26-2021, 07:56 PM)Frogcop Wrote: Hello, I'm having an error when I try to run PIP. I've tried reinstalling Python but it didn't work. (I'm using Python 3.5 because my operating system is a Windows 7)

Error:
Quote:Traceback (most recent call last):
File "c:\users\---\appdata\local\programs\python\python35-32\lib\runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\---\appdata\local\programs\python\python35-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\---\AppData\Local\Programs\Python\Python35-32\Scripts\pip.exe\__main__.py", line 5, in <module>
File "c:\users\---\appdata\local\programs\python\python35-32\lib\site-packages\pip\_internal\cli\main.py", line 60
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax

Sorry for bad English, I'm Brazilian

Base on my experience of coding, it is better to use Visual Studio Code because it would show you the location of errors. So, then you can fix it and also it works with many programing languages.
Reply
#6
(Mar-29-2021, 12:57 AM)Nrajaie Wrote: Base on my experience of coding, it is better to use Visual Studio Code because it would show you the location of errors. So, then you can fix it and also it works with many programing languages.
The error has nothing to do with the IDE being used. Installing external packages via pip is shell/terminal command and you can install packages without even touching IDE. And even if you use integrated terminal (like in VS Code) it is still shell command.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020