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 8277381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:40:35+00:00 2026-06-08T08:40:35+00:00

I installed oauth2 by just downloading tar.gz package and doing python setup.py install .

  • 0

I installed oauth2 by just downloading tar.gz package and doing python setup.py install. However I’m getting this error

bash-3.2$ python
Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import oauth2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named oauth2
>>>

The path to oauth2 is in PYTHONPATH (so that shouldn’t be the issue) as I added this line to ~/.bashrc:

PYTHOHPATH=$PYTHONPATH:/Users/me/Downloads/oauth2-1.5.211/

However, when I do this:

bash-3.2$ cd /System/Library/Frameworks/Python.framework/Versions/2.7/
bash-3.2$ ls
Extras      Headers     Mac     Python      Resources   _CodeSignature  bin     include     lib
bash-3.2$ Python
Python 2.7.1 (r271:86882M, Nov 30 2010, 09:39:13) 
[GCC 4.0.1 (Apple Inc. build 5494)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import oauth2
>>> 

it works just fine. Any idea how I should install oauth2 to avoid ImportError from python?

P/S: this is the simlink for python command

python -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
  • 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-08T08:40:37+00:00Added an answer on June 8, 2026 at 8:40 am

    I don’t have an answer, but I have some general suggestions:

    Run python setup.py install with the same python that you intend to use it from (in your case one is capitalised, the other is not).

    I always export my bashrc variables to ensure they are global, but I am not sure that is your issue here.

    When running scripts in the pwd, always run them with ./. In your case run python as ./Python to have confidence that you are running the executable you think you are running.

    Check your spelling of PYTHONPATH. If you think you have it right, do import sys; print('\n'.join(sys.path)) from within your python session and ensure that the appropriate directory is there

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I have ownloaded simplegeo-python-oauth2-debian-1.5.211-0-ga83f4a2.tar.gz .I do not know how to install it for
Why am I getting this error when running my application which is trying to
I'm trying to install acts_as_ferret in windows7.But am getting an error Using acts-as-taggable-on (2.1.1)
Installed rubyinstaller-1.8.7-p358.exe, then tried to install jammit , but the config.gem command isn't being
I installed Python 3.x (besides Python 2.x on Ubuntu) and slowly started to pair
I installed clojure-mode and slime using the emacs starter kit and I get this
I'm just started playing with Tweepy and have it installed. I've done basic oauth
I have python 2.6.7 installed in my mac (/usr/local/bin/python). Previously, I installed python-twitter library.
After reading from web and forum done successfull installation of OAuth (pecl package) Doing
I got this error. Warning: require_once(HTTP/OAuth.php) [function.require-once]: failed to open stream: No such file

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.