Install failed with Django-Chronograph by pip in django 1.10 - python

Similar to this question but i got a different error.
I'm try to installing via pip with:
pip install django-chronograph
I'm using python 2.7 and a virtualenv
pip freeze
Django==1.10
django-backbone==0.2.3
django-jstemplate==1.1.1
gunicorn==18.0
MySQL-python==1.2.5
six==1.10.0
South==0.7.6
unicodecsv==0.9.4
Error:
pip install django-chronograph
Collecting django-chronograph
Using cached django-chronograph-0.3.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/87/h3ltndc5279cknk_vn9nzjjc0000gn/T/pip-build-_JDRxl/django-chronograph/setup.py", line 32, in <module>
setup_distribute()
File "/private/var/folders/87/h3ltndc5279cknk_vn9nzjjc0000gn/T/pip-build-_JDRxl/django-chronograph/setup.py", line 18, in setup_distribute
distribute_setup = __import__('distribute_setup')
File "distribute_setup.py", line 1
<html>
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/87/h3ltndc5279cknk_vn9nzjjc0000gn/T/pip-build-_JDRxl/django-chronograph/

The problem is with the installation script provided by django-chronograph.
In line 16 of setup.py, it tries to download a script:
https://bitbucket.org/wnielson/django-chronograph/src/f561106f6aaab62f2817e08e51c799320fd916d9/setup.py?at=default&fileviewer=file-view-default#setup.py-16
in this code block:
try:
import distribute_setup
except:
# Make sure we have Distribute
if not os.path.exists('distribute_setup'):
urllib.urlretrieve('http://nightly.ziade.org/distribute_setup.py',
'./distribute_setup.py')
However, when you visit the URL at http://nightly.ziade.org/distribute_setup.py, it gives a 404 error, thus the returned html in the error.
It looks like you might be able to get distribute here: https://pypi.python.org/pypi/distribute/0.7.3
Or try doing this before you install django-chronograph:
pip install distribute
Good luck!

django-chronograph is unmaintained. Its fork is doing much better and has support for Django 2.0 and Django 2.1: https://github.com/chrisspen/django-chroniker

Related

django-numpy gives error with pip

I've been using django-numpy for some time now. But suddenly it gives an error, when I try to install it in a django project.
I've tried different approaches installing django-numpy - made a new venv - tried with another version og both django and django-numpy.
The error I get, when doing a pip install -r requirements.txt is:
Collecting django-numpy==1.0.1 (from -r requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/35/b0/1f0be2e9c4df3b0736b09067dd041eb4475a6199b583428b241eb8576d7d/django-numpy-1.0.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-install-4qp99vp2/django-numpy/setup.py", line 6, in <module>
from pip.download import PipSession
ModuleNotFoundError: No module named 'pip.download'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
/tmp/pip-install-4qp99vp2/django-numpy/
I've tried installing different packages via requirements, with no problems. It's only django-numpy that gives an error?
I do not know if I should make an issue on django-numpy's github?

brew 0.1.4 installation for python pip error

I'm new to python and i have been trying to install brew 0.1.4. I get the following error.
C:\Users\sys>pip install brew
Collecting brew
Using cached brew-0.1.4.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\sys\AppData\Local\Temp\pip-build-m49ufx8l\brew\setup.py",line 22, in <module>
with open('requirements.txt') as fid:
FileNotFoundError: [Errno 2] No such file or directory:'requirements.txt'
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\sys\AppData\Local\Temp\pip-build-m49ufx8l\brew\
I have tried the freeze method to create the requirements file but still get the same error. Help me resolve this.
$ pip freeze > requirements.txt
The requirements.txt seems to be missing in the .zip file from pypi. Try installing from the github repository instead:
pip install git+https://github.com/viisar/brew.git

Error when installing scapy

Ok so i'm trying to install scapy for python3, but ive been having some issues
when I enter this command:
pip install scapy
This is the output:
Collecting scapy
Using cached scapy-2.3.3.tgz
In the tar file C:\Users\MYNAME~1\AppData\Local\Temp\pip-oao3meyq-
unpack\scapy-2.3.3.tgz the member scapy-2.3.3/README
is invalid: unable to resolve link inside archive
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\MYNAME~1\AppData\Local\Temp\pip-build-
qjegdxw6\scapy\setup.py", line 36
os.chmod(fname, 0755)
^
SyntaxError: invalid token
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\MYNAME~1\AppData\Local\Temp\pip-build-qjegdxw6\s
capy\
So then I searched around and I tried using this:
pip3 install scapy-python3
But it just says that pip3 isnt a command, so im not sure what to do
Instead of pip3 use pip
pip install scapy-python3
It worked for me. pip3 is usually used if you have both python2 and python3 installed on your machine. It is uesd to distinguish between different pips in your system.
The pip3.exe will be in python3x/scripts/.
Check if there is a pip3.exe is available in your scripts folder.
If the above solution doesn't work for you then try giving the full path of correct pip.exe.

Problems with pip install django-socketio

pip3 install -U django-socketio outputs the following errors python version on this environment is 3.4.3. The same thing appears when I try to install django channels on python 3.5 or higher
Collecting django-socketio
Downloading django-socketio-0.3.9.tar.gz (48kB)
100% |████████████████████████████████| 51kB 204kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-j3y67yvi/django-socketio/setup.py", line 7, in <module>
version = __import__("django_socketio").__version__,
File "/tmp/pip-build-j3y67yvi/django-socketio/django_socketio/__init__.py", line 2, in <module>
from django_socketio.utils import NoSocket, send, broadcast, broadcast_channel
File "/tmp/pip-build-j3y67yvi/django-socketio/django_socketio/utils.py", line 44
except IndexError, KeyError:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-j3y67yvi/django-socketio/
I tried to install it using pip but I was unsuccessful.
What you can do is:
1) download the Source Code from GitHub to where you want the files to be
git clone https://github.com/stephenmcd/django-socketio
2) unzip it and go inside the django-socketio directory
3) run:
python3 setup.py install
you can check if it has installed by running the command:
pip3 freeze
hope this helps!

egg_info failed with error code 1 for pip install in python 3.6

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

Categories