Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Cannot import yahoo after installing with pip. #4

Open
chrislawlor opened this issue Sep 27, 2011 · 0 comments
Open

Cannot import yahoo after installing with pip. #4

chrislawlor opened this issue Sep 27, 2011 · 0 comments

Comments

@chrislawlor
Copy link

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant