我正试图找出如何打包python项目,以便将其分发给一些同事。
当我跑步时
python setup.py sdist --formats=zip
它创造了一个拉链,我可以
pip install
但当我运行该文件时,它无法导入我创建的类文件。
以下是我的项目文件结构(可能不正确,但我没有充分考虑到打包):
âââ README.md
âââ requirements.txt
âââ scanner
â  âââ __init__.py
â  âââ __pycache__
â  â  âââ googleSheets.cpython-35.pyc
â  â  âââ merakiJsonHandler.cpython-35.pyc
â  â  âââ wifiTester.cpython-35.pyc
â  âââ credentials.json
â  âââ googleSheets.py
â  âââ info.json
â  âââ merakiJsonHandler.py
â  âââ scan.py
â  âââ whatWap.py
â  âââ wifiTester.py
âââ setup.py
import setuptools
setuptools.setup(name='att-scanner',
version='0.1',
description='Meraki Wap/Wifi Scanner',
author='jsolum',
author_email='*****',
license='MIT',
packages=setuptools.find_packages(),
entry_points={
'console_scripts' : [
'mws = scanner:scan.py',],},
install_requires=['pyspeedtest', 'requests', 'gspread', 'oauth2client',],
include_package_data=True)
这是我的错误:
Traceback (most recent call last):
File "//anaconda/bin/mws", line 7, in <module>
from scanner import scan
File "//anaconda/lib/python3.5/site-packages/scanner/__init__.py", line 1, in
<module>
from googleSheets import SheetsController
ImportError: No module named 'googleSheets'
为什么不能
scan.py
进口
googleSheets.py
我该怎么做才能让它导入这个类和我的其他类?