Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: No module named twitter-api #3

Open
mathiasleroy opened this issue Nov 2, 2014 · 3 comments
Open

ImportError: No module named twitter-api #3

mathiasleroy opened this issue Nov 2, 2014 · 3 comments

Comments

@mathiasleroy
Copy link

Does it work with django 1.7?

$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 385, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 354, in execute
django.setup()
File "/usr/local/lib/python2.7/dist-packages/django/init.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 87, in create
module = import_module(entry)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
ImportError: No module named twitter-api

Did I install it properly ? :
$ sudo pip install django-twitter-api
Requirement already satisfied (use --upgrade to upgrade): django-twitter-api in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): django in /usr/local/lib/python2.7/dist-packages (from django-twitter-api)
Requirement already satisfied (use --upgrade to upgrade): django-annoying in /usr/local/lib/python2.7/dist-packages (from django-twitter-api)
Requirement already satisfied (use --upgrade to upgrade): django-picklefield in /usr/local/lib/python2.7/dist-packages (from django-twitter-api)
Requirement already satisfied (use --upgrade to upgrade): django-oauth-tokens>=0.2.2 in /usr/local/lib/python2.7/dist-packages (from django-twitter-api)
Requirement already satisfied (use --upgrade to upgrade): python-dateutil>=1.5 in /usr/local/lib/python2.7/dist-packages (from django-twitter-api)
Requirement already satisfied (use --upgrade to upgrade): tweepy in /usr/local/lib/python2.7/dist-packages (from django-twitter-api)
Requirement already satisfied (use --upgrade to upgrade): six in /usr/local/lib/python2.7/dist-packages (from django-picklefield->django-twitter-api)
Requirement already satisfied (use --upgrade to upgrade): requests==1.2.0 in /usr/local/lib/python2.7/dist-packages (from django-oauth-tokens>=0.2.2->django-twitter-api)
Requirement already satisfied (use --upgrade to upgrade): BeautifulSoup in /usr/local/lib/python2.7/dist-packages (from django-oauth-tokens>=0.2.2->django-twitter-api)
Requirement already satisfied (use --upgrade to upgrade): tyoi.OAuth2 in /usr/local/lib/python2.7/dist-packages (from django-oauth-tokens>=0.2.2->django-twitter-api)
Requirement already satisfied (use --upgrade to upgrade): django-taggit in /usr/local/lib/python2.7/dist-packages (from django-oauth-tokens>=0.2.2->django-twitter-api)
Cleaning up...

@ramusus
Copy link
Owner

ramusus commented Nov 4, 2014

I'm not sure about Django 1.7, but definetly you shouldn't use sudo with pip
Try to unstall without sudo:

pip install django-twitter-api

@mathiasleroy
Copy link
Author

Thanks,

I get permissions errors without sudo
$ pip install django-twitter-api
(...)
Running setup.py install for django-twitter-api

error: could not create '/usr/local/lib/python2.7/dist-packages/twitter_api': Permission denied
Complete output from command /usr/bin/python -c "import setuptools;__file__='/home/aze/build/django-twitter-api/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-sYBmgQ-record/install-record.txt:
running install

running build

running build_py

creating build

creating build/lib.linux-x86_64-2.7

creating build/lib.linux-x86_64-2.7/twitter_api

copying twitter_api/utils.py -> build/lib.linux-x86_64-2.7/twitter_api

copying twitter_api/fields.py -> build/lib.linux-x86_64-2.7/twitter_api

copying twitter_api/factories.py -> build/lib.linux-x86_64-2.7/twitter_api

copying twitter_api/tests.py -> build/lib.linux-x86_64-2.7/twitter_api

copying twitter_api/admin.py -> build/lib.linux-x86_64-2.7/twitter_api

copying twitter_api/init.py -> build/lib.linux-x86_64-2.7/twitter_api

copying twitter_api/models.py -> build/lib.linux-x86_64-2.7/twitter_api

copying twitter_api/decorators.py -> build/lib.linux-x86_64-2.7/twitter_api

creating build/lib.linux-x86_64-2.7/twitter_api/migrations

copying twitter_api/migrations/0001_initial.py -> build/lib.linux-x86_64-2.7/twitter_api/migrations

copying twitter_api/migrations/0002_auto__chg_field_user_profile_image_url_https__chg_field_user_profile_i.py -> build/lib.linux-x86_64-2.7/twitter_api/migrations

copying twitter_api/migrations/init.py -> build/lib.linux-x86_64-2.7/twitter_api/migrations

copying twitter_api/migrations/0003_auto__add_field_status_retweeted_status.py -> build/lib.linux-x86_64-2.7/twitter_api/migrations

copying twitter_api/migrations/0004_auto__add_field_status_place__add_field_status_contributors__add_field.py -> build/lib.linux-x86_64-2.7/twitter_api/migrations

running egg_info

writing requirements to django_twitter_api.egg-info/requires.txt

writing django_twitter_api.egg-info/PKG-INFO

writing top-level names to django_twitter_api.egg-info/top_level.txt

writing dependency_links to django_twitter_api.egg-info/dependency_links.txt

warning: manifest_maker: standard file '-c' not found

reading manifest file 'django_twitter_api.egg-info/SOURCES.txt'

reading manifest template 'MANIFEST.in'

writing manifest file 'django_twitter_api.egg-info/SOURCES.txt'

copying twitter_api/init.pyc -> build/lib.linux-x86_64-2.7/twitter_api

copying twitter_api/admin.pyc -> build/lib.linux-x86_64-2.7/twitter_api

copying twitter_api/decorators.pyc -> build/lib.linux-x86_64-2.7/twitter_api

copying twitter_api/factories.pyc -> build/lib.linux-x86_64-2.7/twitter_api

copying twitter_api/fields.pyc -> build/lib.linux-x86_64-2.7/twitter_api

copying twitter_api/models.pyc -> build/lib.linux-x86_64-2.7/twitter_api

copying twitter_api/tests.pyc -> build/lib.linux-x86_64-2.7/twitter_api

copying twitter_api/utils.pyc -> build/lib.linux-x86_64-2.7/twitter_api

copying twitter_api/migrations/0001_initial.pyc -> build/lib.linux-x86_64-2.7/twitter_api/migrations

copying twitter_api/migrations/0002_auto__chg_field_user_profile_image_url_https__chg_field_user_profile_i.pyc -> build/lib.linux-x86_64-2.7/twitter_api/migrations

copying twitter_api/migrations/0003_auto__add_field_status_retweeted_status.pyc -> build/lib.linux-x86_64-2.7/twitter_api/migrations

copying twitter_api/migrations/0004_auto__add_field_status_place__add_field_status_contributors__add_field.pyc -> build/lib.linux-x86_64-2.7/twitter_api/migrations

copying twitter_api/migrations/init.pyc -> build/lib.linux-x86_64-2.7/twitter_api/migrations

running install_lib

creating /usr/local/lib/python2.7/dist-packages/twitter_api

error: could not create '/usr/local/lib/python2.7/dist-packages/twitter_api': Permission denied


Command /usr/bin/python -c "import setuptools;file='/home/aze/build/django-twitter-api/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record /tmp/pip-sYBmgQ-record/install-record.txt failed with error code 1
Storing complete log in /home/aze/.pip/pip.log
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in
load_entry_point('pip==1.0', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pip/init.py", line 116, in main
return command.main(initial_args, args[1:], options)
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 147, in main
log_fp = open_logfile(log_fn, 'w')
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 176, in open_logfile
log_fp = open(filename, mode)
IOError: [Errno 13] Permission denied: '/home/aze/.pip/pip.log'

@ramusus
Copy link
Owner

ramusus commented Nov 5, 2014

I recommend to you install application inside virtualenv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants