Cannot install channels

901 views
Skip to first unread message

Robin Lery

unread,
Feb 10, 2017, 1:51:52 AM2/10/17
to django...@googlegroups.com
Hi,

I already had a django channels in my other virtual env. But since its an older version of channels (0.7.0) I am trying to install a new channel version into my project which is in a different virtual environment inside a a vagrant box.

I created a new virtualenv
$ mkvirtualenv newsapp

Install django
$ pip install django

Install channels
$ pip install -U channels

Then I am getting error:

Command "/home/vagrant/Envs/newsapp/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-IrzQ_E/twisted/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-ArjPse-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/vagrant/Envs/newsapp/include/site/python2.7/twisted" failed with error code 1 in /tmp/pip-build-IrzQ_E/twisted/

Can you please help how to solve this issue?

Andrew Godwin

unread,
Feb 10, 2017, 1:58:44 AM2/10/17
to django...@googlegroups.com
You don't have the Python development headers installed for your system - you can tell this because of this line in the error:

src/twisted/test/raiser.c:4:20: fatal error: Python.h: No such file or directory

If you install your distribution's python header package (e.g. on ubuntu it's python-dev) it should resolve the error.

Andrew

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2B4-nGpCy3g5KD9Q-UctFF3oKuVqtdfTjkW6XuTLBPiH%2BpyTsw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Robin Lery

unread,
Feb 10, 2017, 2:11:09 AM2/10/17
to django...@googlegroups.com
Yes that was it. Thank you. Could you please help me understand why this might have worked before in a earlier different virtual env in the same vagrant machine?

Andrew Godwin

unread,
Feb 10, 2017, 2:14:25 AM2/10/17
to django...@googlegroups.com
I'm afraid I can't help without looking at the machine directly - I would suspect that either it had a version of Twisted pre-installed on the system that it was happy with (the more recent releases increased the Twisted version requirement), or the version of Twisted it downloaded did not require compilation.

Andrew

Robin Lery

unread,
Feb 10, 2017, 2:16:17 AM2/10/17
to django...@googlegroups.com
Yes. That might have been the problem. Thank you once again!

David W

unread,
Apr 3, 2017, 7:25:18 AM4/3/17
to Django users
I would add that the required package could be "python3.6-dev" if you're working with Python 3.6.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
Reply all
Reply to author
Forward
0 new messages