[英]Create pip package. Error when installing
安裝自己的軟件包時,我看不到錯誤。
我從以下位置創建包:
Mapp/
CHANGES.txt
LICENSE.txt
MANIFEST.in
README.txt
setup.py
mapp/
__init__.py
core/
__init__.py
...
utils/
__init__.py
...
然后我運行:
python setup.py sdist
輸出為:
running sdist
running egg_info
creating Mapp-0.1.0 (and lots of creatin) ...
making hard links in Mapp-0.1.0...
'' not a regular file -- skipping
hard linking CHANGES.txt -> Mapp-0.1.0 (and lots of linking) ...
Writing Mapp-0.1.0/setup.cfg
creating dist
Creating tar archive
removing 'Mapp-0.1.0' (and everything under it)
然后我將執行:
sudo python setup.py install
輸出為:
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files
running bdist_egg
running egg_info
writing Mapp.egg-info/PKG-INFO
writing top-level names to Mapp.egg-info/top_level.txt
writing dependency_links to Mapp.egg-info/dependency_links.txt
reading manifest template 'MANIFEST.in'
writing manifest file 'Mapp.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_py
creating build
creating build/lib.linux-i686-2.7
creating build/lib.linux-i686-2.7/mapp
copying mapp/__init__.py -> build/lib.linux-i686-2.7/mapp (and lots of copying)
byte-compiling build/bdist.linux-i686/egg/mapp/dataset/files.py to files.pyc (and lots of compiling)
creating build/bdist.linux-i686/egg/EGG-INFO
installing scripts to build/bdist.linux-i686/egg/EGG-INFO/scripts
running install_scripts
running build_scripts
creating build/scripts-2.7
error: file '/home/user/workspace/Mapp' does not exist
但是更奇怪的是/ home / user / workspace / Mapp存在,但是它是FOLDER而不是FILE。
請我正試圖解決這一天,現在我不知道該怎么辦。 謝謝。
setup.py
from setuptools import setup, find_packages
setup(
name='Mapp',
version='0.1.0',
author='Ondrej Pelikan',
author_email='onpelikan@gmail.com',
packages=find_packages(exclude=['tests*']),
scripts=[''],
url='http://pypi.python.org/pypi/Mapp/',
license='LICENSE.txt',
description='Package for simplify MAPP prediction analysis workflow.',
long_description=open('README.txt').read(),
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)
清單
include *.txt
recursive-include mapp *.py
我只是想通了! 問題原因:
scripts=[''],
不能有空列表。 此行必須刪除! 然后它起作用了!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.