I created my first package with the following setup.py:
from setuptools import setup, find_packages
setup(
name='mygn',
version='0.1',
packages=find_packages(exclude=['test', 'test.*']),
include_package_data=True,
platforms='any',
install_requires=[
'lxml==3.3.5',
'Pillow==3.0.0',
'requests==2.2.1',
'xmltodict==0.10.1',
'pdfrw==0.2',
'python-dotenv==0.4.0',
'boto==2.39.0',
'click==6.4'
]
)
I installed it in a virtualenv using pip install .
after which I view the installed packages with
$ pip freeze
boto==2.39.0
click==6.4
mygn==0.1 # <== here it is
lxml==3.3.5
ordereddict==1.1
pdfrw==0.2
Pillow==3.0.0
python-dotenv==0.4.0
requests==2.2.1
xmltodict==0.10.1
I then tried importing it, but that fails:
(venv) $ python
Python 2.7.10 (default, Oct 23 2015, 18:05:06)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import mygn
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named mygn
>>> import xmltodict # no problem importing other modules from the pip freeze
>>>
Any ideas what I could be doing wrong here?