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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:17:13+00:00 2026-06-06T03:17:13+00:00

Setup OSX 10.7.4 Eclipse Indigo, Pydev, Tweepy-1.9 I thought this should be relatively simple

  • 0

Setup OSX 10.7.4 Eclipse Indigo, Pydev, Tweepy-1.9

I thought this should be relatively simple but I keep getting an error. I am looking to specify the Tweepy API using sys.path.append( ) However PyDev keeps showing me an “Unresolved import: tweepy” Error

My Code

import sys
sys.path.append('/Applications/tweepy-1.9')
import tweepy

There are several similar posts on this which I have looked at but they seem to give conflicting advice as to whether to link to the top level file or to a particular file within the directory.

My question is should I be linking directly to the top level folder as I am now (/Applications/tweepy-1.9) or to a particular file within this folder? Machaku provided me with some information on a related question saying I could do both but I would have to create a file named “init.py” and link to it.

I have tried both but neither seems to work.

Any suggestions as always are much appriciated


The Error

Traceback (most recent call last):
  File "/Users/brendan/Documents/workspace/Tweeter/src/rate_limit.py", line 13, in <module>
    print api.rate_limit_status()
  File "build/bdist.macosx-10.5-fat3/egg/tweepy/binder.py", line 185, in _call
    return method.execute()
  File "build/bdist.macosx-10.5-fat3/egg/tweepy/binder.py", line 149, in execute
    raise TweepError('Failed to send request: %s' % e)
tweepy.error.TweepError: Failed to send request: [Errno 61] Connection refused

tweepy-1.9 file structure

  • tweepy-1.9

    • build

      • bdist.macosx-10.5-fat3
      • lib
        • tweepy
          • init.py (with 2 underscores either side of ” init “)
          • api.py
          • auth.py
          • binder.py
          • cache.py
          • cursor.py
          • error.py
          • models.py
          • oauth.py
          • parsers.py
          • streaming.py
          • utils.py
    • dist

      • tweepy-1.9-py2.7.egg
    • PKG-INFO
    • README
    • setup.cfg
    • tweepy
      • init.py (with 2 underscores either side of ” init “)
      • api.py
      • auth.py
      • binder.py
      • cache.py
      • cursor.py
      • error.py
      • models.py
      • oauth.py
      • parsers.py
      • streaming.py
      • utils.py
    • tweepy.egg-info
      • dependency_links.txt
      • PKG-INFO
      • SOURCES.txt
      • top_level.txt
      • zip_safe
  • 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-06T03:17:14+00:00Added an answer on June 6, 2026 at 3:17 am

    Given the stack trace, your Tweepy library is found, so your sys.path.append has worked. However, if you read the last line,

    tweepy.error.TweepError: Failed to send request: [Errno 61] Connection refused

    the error seems to be that the library cannot connect to the twitter service.

    Concerning what to put in sys.path, it should be the folder that contains the directory where your top level package lives. So for example, if I have the following structure

    src
     | my_package
     |     | __init__.py
     |     | module_1.py
     |     | module_2.py
    

    and I want to be able to do from my_package import module_1 then sys.path must contain the absolute path to src. Also, the __init__.py file must be present to make my_package a Python package.

    However, dynamically updating sys.path is definitely not the recommended way to make python packages and modules accessible from another Python program.

    There are much better solutions:

    • calling python setup.py install, as recommended in the Tweepy install guide (preferably using a virtualenv)

    • updating PYTHONPATH to include the root path to the Tweety library.

    • using .pth files that are read by the site module

    You can find more details in the Python doc on Installing Python Modules and in particular the Modifying Python’s search path section

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

Sidebar

Related Questions

Setup OSX 10.7.4, Eclipse, Pydev, Python 2.7, Tweepy-1.9 Hey, I was originally trying to
Setup Mac OSX 10.6.8, Apache Tomcat 6.0.16, Java1.6.0_29, Eclipse IDE Indigo. I asked a
Setup Mac OSX 10.6.7, Eclipse, Tomcat 1.6 I am trying to call a string
Trying to get my feet wet with PySide development but having trouble getting setup.
I'm trying install pycrypto on osx with easy_install and I'm getting the following error:
I'm trying to download Eclipse IDE for Android development. I've downloaded the setup but
This is a much discussed issue for OSX 10.6 users, but I haven't been
Setup iMac OSX 10.7.4, Hi there, I am trying to install Homebrew on my
I am having trouble getting postgresql getting set up on Mac OSX Lion. I
setup.py from distutils.core import setup import py2exe setup(console=['program.py']) The error Traceback (most recent call

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.