When I try to execute the following command:
pip install jinja
I have the following error:
Collecting Jinja
Using cached Jinja-1.2.tar.gz (252 kB)
ERROR: Command errored out with exit status 1:
command: 'C:\Program Files\Python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\siddh\\AppData\\Local\\Temp\\pycharm-packaging\\Jinja\\setup.py'"'"'; __file__='"'"'C:\\Users\\siddh\\AppData\\Local\\Temp\\pycharm-packaging\\Jinja\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\siddh\AppData\Local\Temp\pycharm-packaging\Jinja\pip-egg-info'
cwd: C:\Users\siddh\AppData\Local\Temp\pycharm-packaging\Jinja\
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\siddh\AppData\Local\Temp\pycharm-packaging\Jinja\setup.py", line 28
except DistutilsError, e:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
How can I solve this?
Related
I want to install the pywhatkit package, but I got an error like this:
ERROR: Command errored out with exit status 1:
command: /data/data/com.termux/files/usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/data/data/com.termux/files/usr/tmp/pip-install-JBqkiU/pywhatkit/setup.py'"'"'; __file__='"'"'/data/data/com.termux/files/usr/tmp/pip-install-JBqkiU/pywhatkit/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /data/data/com.termux/files/usr/tmp/pip-pip-egg-info-d8Zuw6
cwd: /data/data/com.termux/files/usr/tmp/pip-install-JBqkiU/pywhatkit/
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/data/data/com.termux/files/usr/tmp/pip-install-JBqkiU/pywhatkit/setup.py", line 6
def readme() -> str:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
You are using python version 2 /data/data/com.termux/files/usr/bin/python2
pip install turtle
Collecting turtle
Downloading turtle-0.0.2.tar.gz (11 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-luxoc31a/turtle/setup.py'"'"'; __file__='"'"'/tmp/pip-install-luxoc31a/turtle/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-luxoc31a/turtle/pip-egg-info
cwd: /tmp/pip-install-luxoc31a/turtle/
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-luxoc31a/turtle/setup.py", line 40
except ValueError, ve:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Trying to install terraform_utils with pip on python 2.7 on Mac.
ERROR: Command errored out with exit status 1:
command: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-p0O4_9/terraform-utils/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-p0O4_9/terraform-utils/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/tmp/pip-pip-egg-info-30t_an
cwd: /private/tmp/pip-install-p0O4_9/terraform-utils/
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-install-p0O4_9/terraform-utils/setup.py", line 8
def read_file(path: Union[str, Path]) -> str:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
can anyone help with the above error? not able to figure out what's missing!
Looks like you are running this code with Python2.7 but it is supported only by Python 3.5+. This syntax refers to static typing, more information here:
https://docs.python.org/3/library/typing.html
I was trying to use TTFQuery module but when i write the command pip3 install TTFQuery it returns the following error.
ERROR: Command errored out with exit status 1:
command: 'c:\users\pranon rahman\appdata\local\programs\python\python37\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\PRANON~1\\AppData\\Local\\Temp\\pip-install-z2hpgfba\\TTFQuery\\setup.py'"'"'; __file__='"'"'C:\\Users\\PRANON~1\\AppData\\Local\\Temp\\pip-install-z2hpgfba\\TTFQuery\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);
code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\PRANON~1\AppData\Local\Temp\pip-pip-egg-info-2u2rs2sz'
cwd: C:\Users\PRANON~1\AppData\Local\Temp\pip-install-z2hpgfba\TTFQuery\
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\PRANON~1\AppData\Local\Temp\pip-install-z2hpgfba\TTFQuery\setup.py", line 11
except ImportError, err:
^
SyntaxError: invalid syntax
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
TTFQuery 1.0.5, last released in 2012. The code is obviously only for Python 2.
There is a beta release 2.0.0b1 from 2018. Try
pip install TTFQuery==2.0.0b1
so im trying to do a pip3 install flask-swagger-ui but im getting the following error:
Defaulting to user installation because normal site-packages is not writeable
Collecting flask-swagger-ui
Using cached flask-swagger-ui-3.25.0.tar.gz (521 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-n64v6bxi/flask-swagger-ui/setup.py'"'"'; __file__='"'"'/tmp/pip-install-n64v6bxi/flask-swagger-ui/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-n64v6bxi/flask-swagger-ui/pip-egg-info
cwd: /tmp/pip-install-n64v6bxi/flask-swagger-ui/
Complete output (3 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named 'setuptools'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
please help