Problems with pip install django-socketio - python

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!

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.

Install failed with Django-Chronograph by pip in django 1.10

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

How to build scikit-image in travis-ci?

I am trying to build a script that makes use of scikit-image on Travis-ci. It complains that six is not up to date. Just to be sure, I tried to replicate the .travis.yml of the scikit-image project on github, but it did nothing to change the situation. I also tried to update six, but to no avail...
Does someone know how to build scikit-image on travis?
My requirements.txt:
# Requirements list:
scikit-image
My trace:
$ source ~/virtualenv/python3.3/bin/activate
$ python --version
Python 3.3.5
$ pip --version
pip 6.0.7 from /home/travis/virtualenv/python3.3.5/lib/python3.3/site-packages (python 3.3)
5.80s$ pip install -r requirements.txt
You are using pip version 6.0.7, however version 6.0.8 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting scikit-image (from -r requirements.txt (line 2))
Downloading scikit-image-0.10.1.tar.gz (16.7MB)
100% |################################| 16.7MB 20kB/s
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-wsd_vd/scikit-image/setup.py", line 110, in <module>
check_requirements()
File "/tmp/pip-build-wsd_vd/scikit-image/setup.py", line 105, in check_requirements
% ((package_name, ) + min_version))
ImportError: You need `six` version 1.3 or later.
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-wsd_vd/scikit-image/setup.py", line 110, in <module>
check_requirements()
File "/tmp/pip-build-wsd_vd/scikit-image/setup.py", line 105, in check_requirements
% ((package_name, ) + min_version))
ImportError: You need `six` version 1.3 or later.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-wsd_vd/scikit-image
The command "pip install -r requirements.txt" failed and exited with 1 during .
Your build has been stopped.
If you get an error that a specific dependency isn't being met, being more specific about that dependency usually helps. I like to put dependencies that I don't directly use in a before_install section.
before_install:
pip install six>=1.3
install:
pip install -r requirements.txt
pip allows you to specify constraints on the versions of packages you install. If you had to use 1.3 exactly you could use ==.

Categories