I am setting up a virtualenv on a new server, and when I used pip on our requirements file, it kept dying on Twisted. I commented the Twisted line out, and everything else installed fine. At the command line, this is the output I see when I try to install Twisted (the same error I see when I run the entire requirements file once it gets to the Twisted line):
(foo)company@server:~$ pip install twisted Collecting twisted Could not find a version that satisfies the requirement twisted (from versions: ) No matching distribution found for twisted
I can install Twisted fine from my dev machine and other servers, and on this server I seem to be able to install other packages fine.
Case and version do not matter. Same result if I use "twisted", "Twisted", "Twisted==15.2.1".
This is an EC2 instance running Ubuntu 14.04.02.
If you installed Python from source, with an installer from python.org, or via Homebrew you should already have pip. If you're on Linux and installed using your OS package manager, you may have to install pip separately, see Installing pip/setuptools/wheel with Linux Package Managers.
Ok after struggling with this for several hours, I figured out the problem.
Running pip install --verbose twisted
helped with the diagnosis.
The error message is misleading. The problem is that I built a custom installation of Python 2.7.10 without having previously installed libbz2-dev. So the steps to fix this were:
sudo apt-get install libbz2-dev
cd /<untarred python source dir>
./configure --prefix=<my install path> --enable-ipv6
make
make install
With this done, I can now create virtual environments and pip install Twisted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With