Skip to content

Loading…

Cannot import yahoo after installing with pip. #4

Open
chrislawlor opened this Issue · 0 comments

1 participant

@chrislawlor

I used pip to install yos-social-python into a virtualenv on Linux Mint 10. Subsequently, attempting to import the 'yahoo' module caused an ImportError - No module named yahoo.

I installed the package with:
pip install -e git+https://github.com/yahoo/yos-social-python.git#egg=yos-social-python

I found that my easy-install.pth file had the following entry:
/home/clawlor/.virtualenvs/my_env/src/yos-social-python

When the yahoo package was actually located at:
/home/clawlor/.virtualenvs/my_env/src/yos-social-python/src

This seems to be caused by listing the packages improperly in the setup.py script. According to http://docs.python.org/distutils/setupscript.html#listing-whole-packages, you'd need to have an__init__.py file in the src directory if you wanted to list the packages the way they currently are listed:

package_dir={'yahoo': 'src/yahoo', (etc...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.