我成功地发布了一个名为virtualp的python包。但是当我安装软件包时,它抛出错误



这是错误

Defaulting to user installation because normal site-packages is not writeable
Collecting virtualp
Using cached virtualp-0.0.1.tar.gz (2.1 kB)
ERROR: Command errored out with exit status 1:
command: 'C:Program Files (x86)Python36-32python.exe' -c 'import sys, setuptools, tokenize;           sys.argv[0] = '"'"'C:\Users\SANTOS~1\AppData\Local\Temp\pip-install-kkg3ajy_\virtualp\setup.py'"'"'; __file__='"'"'C:\Users\SANTOS~1\AppData\Local\Temp\pip-install-kkg3ajy_\virtualp\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:UsersSANTOS~1AppDataLocalTemppip-pip-egg-info-_kzh3r8q'
cwd: C:UsersSANTOS~1AppDataLocalTemppip-install-kkg3ajy_virtualp
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:UsersSANTOS~1AppDataLocalTemppip-install-kkg3ajy_virtualpsetup.py", line 15, in <module>
long_description=open('README.txt').read() + 'nn' + open('CHANGELOG.txt').read(),
FileNotFoundError: [Errno 2] No such file or directory: 'CHANGELOG.txt'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full    command output.

*我使用此命令安装程序包-->python-m pip安装virtualp*

这是setup.py文件

从setuptools导入安装程序,find_packages

classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Education',
'Operating System :: Microsoft :: Windows :: Windows 10',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3'
]
setup(
name='virtualp',
version='0.0.1',
description='you can use for Virtual Paints',
long_description=open('README.txt').read() + 'nn' + open('CHANGELOG.txt').read(),
url='',  
author='Santosh Burada',
author_email='santu.burada99@gmail.com',
license='MIT', 
classifiers=classifiers,
keywords='computer-vision', 
packages=find_packages(),
package_data={'virtualp': ['CHANGELOG.txt', 'README.txt']},
install_requires=['opencv-python', 'numpy'] 
)

您需要在对setup.pysetup()的调用中设置package_data。如果没有它,包中就不会包含任何非.py文件。你可以在这里找到详细信息,但它可能看起来像

setup(
...
package_data={'virtualp': ['CHANGELOG.txt', 'README.txt']}
)

相关内容

  • 没有找到相关文章

最新更新