【问题标题】:Create pip package. Error when installing创建 pip 包。安装时出错
【发布时间】:2014-04-03 17:47:26
【问题描述】:

我在安装自己的包时无法判断错误。

我正在从以下位置创建包:

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',
    ],
)

MANIFEST.IN

include *.txt
recursive-include mapp *.py

【问题讨论】:

    标签: python pip packaging


    【解决方案1】:

    我刚刚想通了!问题原因:

    scripts=[''],
    

    不能有空列表。此行必须删除!然后就可以了!

    【讨论】:

      猜你喜欢
      • 2021-12-19
      • 1970-01-01
      • 2019-03-05
      • 1970-01-01
      • 1970-01-01
      • 2015-01-18
      • 2022-01-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多