I am trying to install the w3af framework, I had some inconveniences as any installation that must be configured several things, I am stuck in the part where you install halberd (halberd-0.2.4.tar.gz):
Collecting halberd==0.2.4
Downloading halberd-0.2.4.tar.gz (214 kB)
|████████████████████████████████| 214 kB 1.8 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-yl9osjq5/halberd/setup.py'"'"'; file='"'"'/tmp/pip-install-yl9osjq5/halberd/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-yl9osjq5/halberd/pip-egg-info
cwd: /tmp/pip-install-yl9osjq5/halberd/
Complete output (6 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-yl9osjq5/halberd/setup.py", line 72
print "Running tests found in '%s'..." % module
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Running tests found in '%s'..." % module)?
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I already tried to download the file and install it from pypi.org (https://pypi.org/project/halberd/) and I got the same error, how can I fix it?
The halberd library on Pypi has not been updated since 2010 - it is unmaintained, and incompatible with modern python versions. There is a halberd project on Github, but that was also not updated since 2017.
The w3af project itself has many dependencies on unmaintained libraries, was developed for python2 (which is no longer supported), and has not been updated by its maintainer in a couple of years.
If you are interested in using the framework still, you can check out the w4af project on Github, which includes the same functionality, but has been ported to python3, and all dependencies have also been updated to versions that work with python3.
Related
Whenever I try to pip install cantools==34.0.0 (on python 2.7)
i receive the error:
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support
in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting cantools==34.0.0
Using cached cantools-34.0.0-py2.py3-none-any.whl (77 kB)
Collecting diskcache
Using cached diskcache-5.0.2.tar.gz (47 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\bla\\appdata\\local\\temp\\pip-install-4or8zd\\diskcache\\setup.py'"'"'; __file__='"'"'c:\\
users\\bla\\appdata\\local\\temp\\pip-install-4or8zd\\diskcache\\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\bla\appdata\local\temp\pip-pip-egg-info-mxhtc0'
cwd: c:\users\bla\appdata\local\temp\pip-install-4or8zd\diskcache\
Complete output (10 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\bla\appdata\local\temp\pip-install-4or8zd\diskcache\setup.py", line 5, in <module>
import diskcache
File "diskcache\__init__.py", line 9, in <module>
from .core import (
File "diskcache\core.py", line 434
raise ValueError('disk must subclass diskcache.Disk') from None
^
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 please help me? It seems like it happens when it tries to install the package diskcache
I fixed it, the problem was with installing the diskcache module,
By default it tried to install a python 3 version supported version
when I manually installed it pip install diskcache==4.1.0
and then installed cantools again it worked.
I'm trying to install the bpy package and I’m getting this error:
sara#studentacbook94 ~ % pip install bpy
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Collecting bpy
Using cached bpy-1.2.2.tar.gz (20 kB)
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/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/setup.py'"'"'; __file__='"'"'/private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/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/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/pip-egg-info
cwd: /private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/setup.py", line 179
def build_cmake(self, extension: Extension):
^
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 deal with it?
This error appeared because you're using Python 2.7, and desired package has Type Hints, which were added only in 3.5 (documentaion).
Upgrade your version of Python
I am trying to install the ratfun package for python 3.6 with
pip3.6 install ratfun
but am getting the ERROR shown in code down below.
Doing
sudo pip3.6 install ratfun
or updating setuptools
pip3.6 install --upgrade pip setuptools wheel
doesn't help. I am using the latest version of pip3.6.
From other threads I understood that
ERROR: Command errored out with exit status 1:
can in general be linked to some denied permissions, but I don't know how to fix it. Thanks for any ideas!
I am using macOS 10.15.2
Downloading ratfun-2.6.tar.gz (56 kB)
|████████████████████████████████| 56 kB 1.2 MB/s
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/nc/bzf21l914zq832bjwd5lc4wh0000gn/T/pip-install-7zqss5yi/ratfun/setup.py'"'"'; __file__='"'"'/private/var/folders/nc/bzf21l914zq832bjwd5lc4wh0000gn/T/pip-install-7zqss5yi/ratfun/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/var/folders/nc/bzf21l914zq832bjwd5lc4wh0000gn/T/pip-install-7zqss5yi/ratfun/pip-egg-info
cwd: /private/var/folders/nc/bzf21l914zq832bjwd5lc4wh0000gn/T/pip-install-7zqss5yi/ratfun/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tokenize.py", line 452, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/nc/bzf21l914zq832bjwd5lc4wh0000gn/T/pip-install-7zqss5yi/ratfun/setup.py'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.```
The package really doesn't have setup.py. It's not a pip-installable package. You can download it, unpack and try to run python clnum_setup.py install. But please note the package was last released in 2009 so I'd not expect it to run with Python 3. Try Python 2.7.
I am trying to install the package 'preprocess' from inside terminal of pyCharm IDE but it is showing the folloiwing error.
i tried this command
pip install preprocess
and I am getting following errors
Collecting preprocess
Using cached
https://files.pythonhosted.org/packages/05/f9/559841df6c91428a2024ce120d92 192844178e4b2ceec1da84ce18205380/pr
eprocess-1.1.0.zip
ERROR: Command errored out with exit status 1:
command: 'c:\users\majid\appdata\local\programs\python\python38- 32\python.exe' -c 'import sys, setuptools, tokenize; sy
s.argv[0] = '"'"'C:\\Users\\majid\\AppData\\Local\\Temp\\pip- install-rsxg10hs\\preprocess\\setup.py'"'"'; __file__='"'"'C:\\
Users\\majid\\AppData\\Local\\Temp\\pip-install- rsxg10hs\\preprocess\\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\majid\AppData\Local\Temp\pip-install- rsxg10hs\preprocess\pip-egg-info'
cwd: C:\Users\majid\AppData\Local\Temp\pip-install- rsxg10hs\preprocess\
Complete output (8 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\majid\AppData\Local\Temp\pip-install-rsxg10hs\preprocess\setup.py", line 28, in <module>
import preprocess
File "C:\Users\majid\AppData\Local\Temp\pip-install-rsxg10hs\preprocess\lib\preprocess.py", line 264
except Exception, ex:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
As the release history of the project preprocess shows, it's a very old project that hasn't had a release in over 10 years. It is very unlikely to be compatible with current versions of Python. The error output in the question seems to show the error message comes from trying to install the project for Python 3.8 and the error itself seems to show that it fails on code with the Python 2 syntax.
I would not recommend using this project at all. Alternatively you could try using it with a Python 2 version of the interpreter.
I'm very new to python and when i tried to install some lib it is giving me this issue. can you please help on what to do.
When trying to install ssl using pip command it is giving me the below error
"pip install ssl"
Collecting ssl
Using cached https://files.pythonhosted.org/packages/83/21/f469c9923235f8c36d5fd5334ed11e2681abad7e0032c5aba964dcaf9bbb/ssl-1.16.tar.gz
ERROR: Command errored out with exit status 1:
command: 'c:\users\rajesh_navaneeth\appdata\local\programs\python\python37\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\RAJESH~1\\AppData\\Local\\Temp\\pip-install-ag0q6n7p\\ssl\\setup.py'"'"'; __file__='"'"'C:\\Users\\RAJESH~1\\AppData\\Local\\Temp\\pip-install-ag0q6n7p\\ssl\\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 pip-egg-info
cwd: C:\Users\RAJESH~1\AppData\Local\Temp\pip-install-ag0q6n7p\ssl\
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\RAJESH~1\AppData\Local\Temp\pip-install-ag0q6n7p\ssl\setup.py", line 33
print 'looking for', f
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('looking for', f)?
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
long story short, don't install that python package. It's deprecated (shouldn't be installed in Python 2.6 and newer) and your python already includes ssl package.
In general you shouldn't even be able to install it via pip, but I guess that it's so old that setup.py didn't support version restrictions in the same way it does now.