I am trying to write some script which requires ropper. (install only via pip)
How can i fix this problem?
I am trying to install it on linux, tried to upgrade setuptools, install old version and followed this, only one topic, which i found:
the link!
This is the error message:
$ pip install ropper
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting ropper
Using cached https://files.pythonhosted.org/packages/94/b1/922dfab5083ff439ce70358c7f3e49185c54e6ea6ee2bb7cd292e63eac06/ropper-1.12.1.tar.gz
Collecting filebytes>=0.9.18 (from ropper)
Using cached https://files.pythonhosted.org/packages/0b/3a/9fc0c62bd74583137a8bbc3c8020d6a8234b9cf8bc1e99fe929688b19093/filebytes-0.9.20.tar.gz
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-d44HeD/filebytes/setup.py", line 3, in <module>
from pathlib import Path
ImportError: No module named pathlib
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-d44HeD/filebytes/
filebytes==0.9.20 release is not compatible with Python 2; the package maintainer already fixed this, but the new version is not yet uploaded to PyPI. Restrict filebytes to previous version for now:
$ pip install "filebytes<0.9.20" ropper
Once next version (0.9.21) is released, you can update it if you want:
$ pip install --upgrade "filebytes>0.9.20"
Related
I am trying to install pre-commit for python2.7 with pip 8.1.2.
If i do pip install --user pre-commit or ´python -m pip install --user pre-commit´ it keeps trying to load pre-commit3.0.2 and failing.
So i tried to find the most recent version that still supports python2.7 (by manually going through the version history, is there not better way?) and that is 1.21.0.
But even when i do pip install --user pre-commit==1.21.0 it fails due to
Collecting virtualenv>=15.2 (from pre-commit==1.21.0)
Using cached https://files.pythonhosted.org/packages/7b/19/65f13cff26c8cc11fdfcb0499cd8f13388dd7b35a79a376755f152b42d86/virtualenv-20.17.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-mjJnKQ/virtualenv/setup.py", line 4, in <module>
raise RuntimeError("setuptools >= 41 required to build")
RuntimeError: setuptools >= 41 required to build
which i assume is because virtualenv-20.17.1 requires python3
Yes, I think pre-commit is not supported for Python 2.7 and starts only in 3.7 but you can write a custom hook or any other tools that you are using for linting based on the IDE you are using.The hook would need to check for any errors in the code before committing, and if any errors are found, it should fail the commit and display a warning message.
Excuse me if this is a noob's question, but I am blank if it comes to Python...
I am trying to install the Python av library on a Raspberry Pi 3. But all I get is
pi#raspberrypi:~/camera_proxy $ sudo pip install av
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting av
Downloading https://files.pythonhosted.org/packages/40/e6/da37b548e9e1312fb11ffd0f31f8679e1b96d3859790a77e93a113394d34/av-8.0.3.tar.gz (2.3MB)
100% |████████████████████████████████| 2.3MB 49kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-Mwk4pG/av/setup.py", line 9, in <module>
from shlex import quote
ImportError: cannot import name quote
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-Mwk4pG/av/
I already purged and reinstalled all Python (1&3) to no avail. The Raspbian is the latest stable release.
There seems to be a quote item not found, that supposedly would be part of the shlex library?
The solution for me was to use pip3 instead of pip.
As the title says, I am trying to install a program that has a couple of dependecies that demand a specific Python version (>= 3.7). I do not have admin rights, so I can't use sudo. The Python version installed is 2.7. Because of that, I used virtualenv to install and execute Python 3.9.5.
I executed venv, and checked the Python and pip versions:
which python
/home/honda/venv_python-3.9.5/bin/python
which pip
/home/honda/venv_python-3.9.5/bin/pip
I even checked the version using:
python
Python 3.9.5 (default, May 10 2021, 13:50:25)
Which, as I understand, means that I have the correct Python/pip versions.
However, when I try to install the program, I get this:
./install.sh ../Programs/
Installing darwin binary...
Installing oma...
Installing libraries...
creating virtualenv for hog_bottom_up
Collecting numpy (from -r ../Programs//OMA/OMA.2.4.2/hog_bottom_up/requirements.txt (line 1))
Using cached https://files.pythonhosted.org/packages/f3/1f/fe9459e39335e7d0e372b5e5dcd60f4381d3d1b42f0b9c8222102ff29ded/numpy-1.20.3.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-3_2_atp3/numpy/setup.py", line 30, in <module>
raise RuntimeError("Python version >= 3.7 required.")
RuntimeError: Python version >= 3.7 required.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-3_2_atp3/numpy/
You are using pip version 8.1.1, however version 21.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Cannot install python dependencies for hog-bottom-up inference algorithm
cannot create virtual environment for hog_bottom_up
To be honest, I don't know what is happening here. Is there something I am missing? I am not experienced in using virtualenv (I previously used another computer, one that I could use sudo, so I never had any problems like this, and I did install this same program there.)
Is there anything I can try? I guess could reach out to the admin and ask them to install the program for me, but I'd rather not do that yet.
Thank you!
for a specific reason I need to install nltk 2.09b in python 2.7 version. But whenever I execute the following command,
pip2 install nltk==2.0b9
I get the following error:
Collecting nltk==2.0b9
Using cached https://files.pythonhosted.org/packages/ea/b3/4c5157bf034437905fbbd3c80e58c8b4a22cf3400db0bdf19dae3079a732/nltk-2.0b9.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
IOError: [Errno 2] No such file or directory: '/private/var/folders/3b/yskb8jks10lf_pqvv1sy7v740000gn/T/pip-install-63jdDZ/nltk/setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/3b/yskb8jks10lf_pqvv1sy7v740000gn/T/pip-install-63jdDZ/nltk/
But if I run without any version specification I don't get an error. like the following:
pip2 install nltk;
How can I solve this issue?
First thing: using anaconda, you probably have a recent enough pip and setuptools and should use conda itself to update those. With anaconda, conda install is the primary resource for installing anaconda-provided packages. Then, "2.0b9" is a beta release (as indicated by the "b9") and might suffer from a configuration problem for the install. The setup.py file is not located at the root of the downloaded archive file, I suppose that creates the problem.
Use this
pip3.6 install nltk==version
so I am new to Python and what is a good way to learn it is to do some personal project :) So I am on my Windows and using virtualenv to contain environment
So, I need to use the Scrappy module:
pip install scrappy
Collecting scrappy
Using cached Scrappy-0.3.0.alpha.4.tar.gz
Collecting guessit (from scrappy)
Using cached guessit-2.1.4.tar.gz
Collecting tvdb_api (from scrappy)
Using cached tvdb_api-2.0.tar.gz
Collecting hachoir-metadata (from scrappy)
Using cached hachoir-metadata-1.3.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\USERPH\AppData\Local\Temp\pip-build-__zp7zbj\hachoir-metadata\setup.py", line 65
except OSError, err:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\USERPH\AppData\Local\Temp\pip-build-__zp7zbj\h
achoir-metadata\
Its because hachoir-metadata is a Python2 dependent package, so I tried installing their Python 3 version
pip install hachoir3
I confirmed that it was installed using
pip list | Select-String hachoir3
so I tried running
pip install scrappy again
but same error.
Any work around to install scrappy? I cannot go down to Python 2.
Thanks!
Scrappy itself contains code that only works in Python 2. I.e. Scrappy cannot be used with Python 3+.