So, I've been trying to install the gutenberg module for python pip install gutenberg using the directions at this site (using brew instead of pip since I'm on a mac). Every time I try do do it, it returns with this:
pip install gutenberg
Collecting gutenberg
Using cached Gutenberg-0.4.2.tar.gz
Collecting bsddb3>=6.1.0 (from gutenberg)
Using cached bsddb3-6.2.1.tar.gz
Complete output from command python setup.py egg_info:
Can't find a local Berkeley DB installation.
(suggestion: try the --berkeley-db=/path/to/bsddb option)
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/53/zsh0zhwx635d_rss6hkgrknr0000gn/T/pip-build-Mn4wGp/bsddb3/
So, I installed the berkeley database using brew (brew install berkeley-db) and the error changed:
pip install gutenberg
Requirement already satisfied (use --upgrade to upgrade): gutenberg in ./anaconda2/lib/python2.7/site-packages/Gutenberg-0.4.2-py2.7.egg
Collecting bsddb3>=6.1.0 (from gutenberg)
Using cached bsddb3-6.2.1.tar.gz
Complete output from command python setup.py egg_info:
Trying to use the Berkeley DB you specified...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/53/zsh0zhwx635d_rss6hkgrknr0000gn/T/pip-build-FEd8dy/bsddb3/setup.py", line 40, in <module>
import setup2
File "setup2.py", line 350, in <module>
"version %d.%d" %db_ver)
TypeError: %d format: a number is required, not NoneType
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/53/zsh0zhwx635d_rss6hkgrknr0000gn/T/pip-build-FEd8dy/bsddb3/
I tried doing easy_install, re-installing setup-tools, and a bunch of other stuff. Here's the links to all the things I've tried:
Can't install via pip because of egg_info error
Python pip install gives "Command "python setup.py egg_info" failed with error code 1"
Python pip install fails: invalid command egg_info
pip fails to install anything, error: invalid command 'egg_info'
https://github.com/PokemonGoF/PokemonGo-Bot/issues/2919
When I say I've tried all of them, I really do mean all of the suggestions in the links above, so maybe I messed something up in that process. I'm not entirely sure what's going on, I've been working on it for hours and haven't been able to discover with any successful solutions. I'm not sure if I'm missing something here but if anyone has any suggestions it would really help.
Just an addition from my side...
I fixed this issue on my Windows 10 for python 3.4:
Go to Powershell Window and type below:
1) Update pip >>>>> py -3.4 -m pip install --upgrade pip
2) Install Numpy >>>>> py -3.4 -m pip install numpy
3) Install Matplotlib >>>> py -3.4 -m pip install matplotlib
Related
Trying to install build dependencies with pip which is installing in /usr/local/lib/python2.7/dist-packages
As I try to install proceed gives an error
Collecting git+https://github.com/kti/python-netfilterqueue (from -r requirements.txt (line 1))
Cloning https://github.com/kti/python-netfilterqueue to /tmp/pip-req-build-VQbxfT
Running command git clone -q https://github.com/kti/python-netfilterqueue /tmp/pip-req-build-VQbxfT
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python2 /usr/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpNlNAvr
cwd: /tmp/pip-req-build-VQbxfT
Complete output (4 lines):
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 16, in <module>
from importlib import import_module
ImportError: No module named importlib
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python2 /usr/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpNlNAvr Check the logs for full command output.
so I try to install importlib with pip and I still get the same error. Then I install it directly to /usr/lib/python2.7/dist-packages/pip/_vendor/pep517/ using
pip install importlib --target=/usr/lib/python2.7/dist-packages/pip/_vendor/pep517/
because pip has been installing all packages to /usr/local/lib/python2.7/dist-packages,
but I still get the error either way
Assuming you are trying to install python-netfilterqueue.
You can visit github page and see this
The current version of NetfilterQueue requires Python 3.6 or later.
So you can't install this lib for python 2.7
But you can install 0.9.0 as it also stated that
The last version with support for Python 2.7 was 0.9.0.
pip install NetfilterQueue=0.9.0
Try switching to python3 because this will definitely work.
First you have to install cython.
pip install cython
Then after that you need to make sure you install NetfilterQueue from source.
git clone https://github.com/oremanj/python-netfilterqueue
Navigate to the netfilterqueue directory.
cd python-netfilterqueue
Then run this command.
python3 setup.py install
That's it. It should work properly
I have a problem installing wsgiref:
$ python --version
Python 3.6.0 :: Anaconda 4.3.1 (x86_64)
$ pip --version
pip 9.0.1 from /anaconda/lib/python3.6/site-packages (python 3.6)
My requirement.txt file are shown as below.
numpy==1.8.1
scipy==0.14.0
pyzmq==14.3.1
pandas==0.14.0
Jinja2==2.7.3
MarkupSafe==0.23
backports.ssl-match-hostname==3.4.0.2
gnureadline==6.3.3
ipython==2.1.0
matplotlib==1.3.1
nose==1.3.3
openpyxl==1.8.6
patsy==0.2.1
pyparsing==2.0.2
python-dateutil==2.2
pytz==2014.4
scikit-learn==0.14.1
six==1.7.3
tornado==3.2.2
wsgiref==0.1.2
statsmodels==0.5.0
when I run pip install -r requirement.txt, I got this error
Collecting wsgiref==0.1.2 (from -r requirements.txt (line 20))
Using cached wsgiref-0.1.2.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/xs/y0pbzxkn7gqcdtrz4cpxtwrw0000gn/T/pip-build-hkiqbu1j/wsgiref/setup.py", line 5, in <module>
import ez_setup
File "/private/var/folders/xs/y0pbzxkn7gqcdtrz4cpxtwrw0000gn/T/pip-build-hkiqbu1j/wsgiref/ez_setup/__init__.py", line 170
print "Setuptools version",version,"or greater has been installed."
^
SyntaxError: Missing parentheses in call to 'print'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/xs/y0pbzxkn7gqcdtrz4cpxtwrw0000gn/T/pip-build-hkiqbu1j/wsgiref/
I have tried to run pip install --upgrade setuptools and sudo easy_install -U setuptools but neither works. How can I solve this problem?
wsgiref is already been included as a standard library in Python 3...
So in case if you are trying with Python 3 just go ahead and import wsgiref thats it.
According to this line SyntaxError: Missing parentheses in call to 'print', I think it needs Python 2.x to run the setup.py. Whether to use parentheses in print is the different syntax of Python 2 and Python 3.
This is the solution from the Github issue:
There are a few fixes that will get you running, in order of least work to most:
Switch over to python2.7 for your will installs.
Try to upgrade wsgiref with pip install --upgrade wsgiref, and see if the latest version works with your setup, and with will (if it doesn't, you'd notice the http/webhooks stuff not working.
If you try 2) and it works, submit a PR here with the upgraded version in requirements.txt. (You can find out what versions you've got by using pip freeze).
You can find more about the syntax difference here
Solution:
Flask-restful is deprecated, use version flask-restx
I am new to Python and I am trying to install pypgen.
As explained one the webpage, I first installed "samtools" (via brew install samtools as recommended).
Trying to install pypgen
I tried the 4 ways suggested by the author to install pypgen
$pip3.6 install pypgen
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/yv/n6rkh3sn5mn5qpsn87lvjw4m0000gp/T/pip-build-aQiBgg/pypgen/
$easy_install pypgen
Processing pypgen
error: Couldn't find a setup script in /Users/remi/Downloads/pypgen-0.2.1/pypgen
$pip3.6 install -e git+https://github.com/ngcrawford/pypgen.git
Could not detect requirement name, please specify one with #egg=
I downloaded "pypgen-0.2.1.tar.gz" from the pypgen website, uncompressed it, cd to the folder and did
$python setup.py install
Traceback (most recent call last):
File "setup.py", line 1, in <module>
import distribute_setup
ImportError: No module named distribute_setup
So, I did
$pip3.6 install distribute
but it did not solve the previous issue
Trying to Solve egg_info error
This egg_info error seems to be key. I tried to download this file and did
sudo python ez_setup.py
as recommended on this post but it did not solve the error messages above. I then tried
sudo pip3.6 install --upgrade setuptools
as recommended on this post but I keep receiving the same error messages when doing pip3.6 install pypgen
I am using Python 3.6 but I also have the version 2.7 installed. I tried everything with both versions (pip3.6 and pip2.7) and get the same errors. I am on MAC OS X 10.11.3
I've recently done a clean install of Python 3.6 on my Windows 10 laptop.
I wish to install BeautifullSoup. When i try to use
python -m pip install BeautifulSoup
it returns the following:
C:\Users\mjpvanzuijlen\AppData\Local\Programs\Python\Python36>python -m pip install BeautifulSoup
Collecting BeautifulSoup
Using cached BeautifulSoup-3.2.1.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\MJPVAN~1\AppData\Local\Temp\pip-build-kopzhsyx\BeautifulSoup\setup.py", line 22
print "Unit tests have failed!"
^
SyntaxError: Missing parentheses in call to 'print'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\MJPVAN~1\AppData\Local\Temp\pip-build-kopzhsyx\BeautifulSoup\
I found others with similair problems with egg_info, but the solutions did not work for me. I have tried to upgrade pip, i downloaded setuptools32.3.2.1, i've upgraded setupttools but all to no avail.
It looks like you are trying to install the wrong package.
Try running: python -m pip install BeautifulSoup4
instead of: python -m pip install BeautifulSoup
I am new to Python and I am trying to install recsys package.
http://ocelma.net/software/python-recsys/build/html/installation.html
For this i need to install some pre-requiste packages, so i have to run this using pip
pip install csc-pysparse networkx divisi2
But whenever i run this i get the following in logs
Collecting csc-pysparse
Using cached csc-pysparse-1.1.1.4.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\64\AppData\Local\Temp\pip-build-wn7_65_9\csc-pysparse\
setup.py", line 33
print 'setuptools module not found.'
^
SyntaxError: Missing parentheses in call to 'print'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\i054564\
AppData\Local\Temp\pip-build-wn7_65_9\csc-pysparse\
I checked that setuptools exist in my python installation here
C:\Python34\lib\site-packages
I have ran everything from unstinalling setuptools to install it again, upgrade command, but it does not work.
Not able to figure out why setuptools is not found. Is it not found in the path of where pip resolves it from ?
cheers,
Saurav
The code triggering the error is Python 2-specific and is illegal in Python 3.
Apparently, csc-pysparse doesn't support Python 3 (its README only mentions 2.6) and looks abandoned (6 years since last commit).
Some guys out there suggest replacing it with SciPy.
The error is coming from the installation code of recsys package. In order to avoid this error, you need to install setuptools separately.
For debian machines, the below command will work.
sudo apt-get install python3-setuptools
For other machines, please checkout installation instructions at the link
Once setuptools package is installed, you can proceed with csc-pysparse installation.