无法导入我自己的PyPI包

时间:2016-06-06 16:08:33

标签: python pypi

我正在尝试在PyPI上提供一个包。我已将其上传到PyPI,它可以按如下方式安装: pip install autostager。但是,打开shell并尝试导入它并不能按预期工作:

>>> import autostager
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named autostager

供参考,这里是setup.py

from distutils.core import setup
setup(
  name = 'autostager',
  packages = ['autostager'],
  version = '0.1',
  description = 'Stage a directory based on Github pull request (e.g., dynamic puppet environments)',
  author = 'Jordan Facibene',
  author_email = 'jordan.facibene13@stjohns.edu',
  url = 'https://github.com/jfach/autostager',
  download_url = 'https://github.com/jfach/autostager/tarball/0.1',
  keywords = ['github', 'automation', 'staging'],
  classifiers = []
)

供参考,我的资料库可以在这里找到:https://github.com/jfach/autostager

我想要导入的模块是autostager.py目录中的autostager(以及其他模块)。

非常感谢任何有关此事的帮助。

0 个答案:

没有答案
相关问题