我想把我的第一个软件包上传到PyPi上。一切似乎都很好,除了我的功能无法访问包中的相关文件。错误如下。你知道吗
File "/Users/my_username/anaconda/lib/python3.6/site-packages/deepcut/deepcut.py", line 134, in tokenize
with open('weight/object.pk', 'rb') as handle:
FileNotFoundError: [Errno 2] No such file or directory: 'weight/object.pk'
我已经检查过pip是否真的安装了我的文件包。下面是我的安装目录/Users/my\u username/anaconda/lib/python3.6/site-packages/deepcut中的内容
__init__.py
deepcut.py
__pycache__
...
weight
best_cnn.h5
object.pk
我用来创建包的文件夹包括
LICENCE.txt
MANIFEST
MANIFEST.in
README.rst
setup.dfg
setup.py
deepcut
__init__.py
deepcut.py
weight
best_cnn.h5
object.pk
安装文件的内容如下。你知道吗
from distutils.core import setup
import setuptools
setup(
name = 'deepcut',
packages = ['deepcut'],
package_dir={'deepcut': 'deepcut'},
package_data={'deepcut': ['weight/*']},
include_package_data=True,
version = '0.5.0.13',
install_requires=['keras', 'pandas', 'scipy', 'numpy'],
license='MIT',
description = 'A Thai word tokenization library using Deep Neural Network',
author = 'Rakpong Kittinaradorn',
author_email = 'r.kittinaradorn@gmail.com',
url = 'https://github.com/rkcosmos/deepcut',
download_url = 'https://github.com/rkcosmos/deepcut/package/0.5.zip',
keywords = ['thai word segmentation deep learning neural network development'],
classifiers = ['Development Status :: 3 - Alpha'],
)
以及清单.in你知道吗
# Include the license file
include LICENSE.txt
include README.rst
# Include the data files
recursive-include deepcut *
您可以尝试改用绝对路径。你知道吗
相关问题 更多 >
编程相关推荐