Saturday, March 22, 2014

Install twisted in a virtual environment on OS X Mavericks

A recruiter suggested that I look at twisted before having an interview with a client.  Strangely enough, learning how to install twisted in a virtual environment on OS X Mavericks is not easy probably because some of twisted is installed in OS X anyway.  However, I was not using the system python.  I was using the python I installed with brew, so I kept getting this error message:

ImportError: No module named twisted

After poking around a little bit, I finally broke down and asked Stack Overflow:


First, I made a virtual environment called try_twisted, and then I installed twisted with pip:

(try_twisted)christohersmbp2:try_twisted christopherspears$ pip install twisted

Now twisted works:

(try_twisted)christohersmbp2:try_twisted christopherspears$ python
Python 2.7.5 (default, Aug 25 2013, 00:04:04) 
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import twisted
>>> 

No comments:

Post a Comment