Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8253513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:54:00+00:00 2026-06-08T00:54:00+00:00

I am trying to install the python-oath2 library in my Python virtual environment running

  • 0

I am trying to install the python-oath2 library in my Python virtual environment running python 2.7.3 via Pythonbrew on a Dreamhost shared hosting file.

First I downloaded the tarball on this link and then extracted the file contents.
https://github.com/simplegeo/python-oauth2

I then cded into the extracted folder and then ran

python setup.py build
python setup.py install

This produced a new file oauth2-1.5.211-py2.7.egg in the directory

/home/davidfaux/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages

When I import oauth2 in the Python interpreter, no errors surface. However, when I call import oauth2 in views.py of my Django application, an error is raised:

Could not import myapp.views. Error was: No module named oauth2

I tried restarting Passenger (touch tmp/restart.txt), restarting Python (pkill python), and re-sshing into the server. I also tried pb switch 2.7.3 to ensure that I was using the right version of Python. Why doesn’t Django let me import oauth2 if importing it works in the Python interpreter?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T00:54:02+00:00Added an answer on June 8, 2026 at 12:54 am

    The process running your django application is either:

    1. Not using your custom Python, so it cannot find your package
    2. Has a different directory listed in PYTHONPATH for packages, and it cannot find it.
    3. Finally, if both those aren’t true – try removing all *.pyc files using something like this – find . -name *.pyc -exec rm {} \; and restart your backend server (passenger).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to install python to a 1and1.com shared linux hosting account. There is
trying to install gdata python library client,receiving following errors: running install running build running
I have Python 2.7 running on Windows XP. I am trying to install Spynner
I am trying to install Python 2.6.5 on my web server running Debian 4.3.2.1-1.
Hi I'm trying to install the python image library at www.pythonware.com/products/pil and am getting
I am trying to install python bindings for the enchant library (pyenchant), according to
I'm trying to install virtual-python on linux server which I don't have root access.
I am trying to install the aggdraw python library to create high quality graphics
I am trying to install the python library pyinterval. It requires the crlibm C
I'm trying to install a simple python library I created and think I may

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.