Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So I have downloaded easy_install on python 3.3.2 and I want to install the Python Twitter package. So I write 'easy_install twitter' in command prompt. A user account control window pops up asking if I want easy_install.exe to make changes to my computer. Then a second command prompt windows pops up and a lot of text goes through the window then it closes without me having a chance to read it. There is no output after this in the original command prompt window. I then go into python and do 'import twitter' but it doesn't recognize the module so I guess it wasn't installed.

Any suggestions?

share|improve this question

migrated from stackoverflow.com Jun 29 '13 at 10:31

This question came from our site for professional and enthusiast programmers.

add comment

3 Answers

up vote 1 down vote accepted

Try running easy_install in an elevated command prompt (right-click command prompt and choose "Run as administrator"). You should be able to see the error messages then.

It may be that twitter doesn't support Python 3. In that case install Python 2.7 and try again.

share|improve this answer
    
This worked but when I import twitter it gives the error "raise ImportError, "Unable to load a json library"". I read stackoverflow.com/questions/15339072/… and it seems this package is not supported by Python 3. ArgggG! –  user1893354 Jun 28 '13 at 14:14
add comment

I would guess you are running under windows so I would look in the C:\pythonX.Y\Scripts directory for a file called easy_install-X.Y-script.py, (where X & Y are the python major and minor version number, so for python 2.7.something look for c:\Python27\Scripts\easy_install-2.7-script.py), and then run that from the command prompt. e.g.:

c:\Python27\Scripts\easy_install-2.7-script.py twitter

Alternatively follow the instructions at: https://code.google.com/p/python-twitter/ for how to install without easy-install.

share|improve this answer
add comment

https://code.google.com/p/python-twitter/

Install it manually is probably your best bet. That being said:

  1. Insure you have the necessary dependencies.
  2. Check that python versions match on both the dependencies, the twitter module, and your python installation.
    • There is the possibility you will need to drop down to Python 2 instead of Python 3.
share|improve this answer
    
Not a happy answer, but there are too many variables to be able to figure out your exact situation without a long commentary and, in my opinion at least, it's always better to install libraries and modules like this manually. –  Matthew Ark Jun 28 '13 at 14:02
    
I tried that but when I try to install the Oauth2 dependency from github.com/simplegeo/python-oauth2 I get an error when running the setup.py file which says 'File "setup.py", line 18 - print "unable to find version in %s" % <VERSIONFILE,> - syntaxError: invalid syntax'. I imagine this is because I am using Python 3 and that is not how print statements are done in python 3. Any suggestions? –  user1893354 Jun 28 '13 at 14:06
    
It's probably exactly that then - version issues. The link you supplied has files from 2-3 years ago. There are more up-to-date oauth2 modules to be found here: oauth.net/2 –  Matthew Ark Jun 28 '13 at 14:12
    
I think the quickest/surest solution here is to drop down to Python 2. There's a lot of libraries out there that haven't yet been (or never will be) ported to Python 3 unfortunately. Obviously this might not be possible depending on your situation. - Editing answer to reflect this conversation. –  Matthew Ark Jun 28 '13 at 14:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.