python安装缺少文件_python设置.py安装缺少的依赖项

我尝试使用以下方法安装python包:

Python设置.py安装

我的设置.py看起来像这样:import os

from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))

with open(os.path.join(here, 'README.txt')) as f:

README = f.read()

with open(os.path.join(here, 'CHANGES.txt')) as f:

CHANGES = f.read()

requires = [

'pyramid',

'pyramid_chameleon',

'pyramid_debugtoolbar',

'mysql-python',

'SQLAlchemy',

'transaction',

'zope.sqlalchemy',

'waitress',

'pyramid_tm',

'simplejson',

'webtest',

'mock', 'pyopenms'

]

setup(name='mypackage',

version='0.1',

description='mypackage',

long_description=README + '\n\n' + CHANGES,

classifiers=[

"Programming Language :: Python",

"Framework :: Pyramid",

"Topic :: Internet :: WWW/HTTP",

"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",

],

author='',

author_email='',

url='',

keywords='web wsgi bfg pylons pyramid',

packages=find_packages(),

include_package_data=True,

zip_safe=False,

test_suite='mypackage_test',

install_requires=[],

entry_points="""\

[paste.app_factory]

main = mypackage:main

[console_scripts]

initialize_mypackage_db = mypackage.scripts.initializedb:main

""",

)

我的问题是,虽然安装了mysql python。它尝试将MySQLdb作为一个包安装。它看起来像是扫描所有文件中使用过的包并尝试安装它们。但是这是不可能的,因为没有名为MySQLdb-only-mysql-python的包。在

以下是我收到的错误:

^{pr2}$

如果我使用pip安装。

我得到的基本相同的错误:Collecting MySQLdb (from mypackage==0.1)

/Users/Backert/ligandomat_env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.

SNIMissingWarning

/Users/Backert/ligandomat_env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.

InsecurePlatformWarning

Could not find a version that satisfies the requirement MySQLdb (from mypackage==0.1) (from versions: )

No matching distribution found for MySQLdb (from mypackage==0.1)

MySQLdb包似乎可以在其他python文件中找到,这些文件是projekt的一部分。我将包作为import MySQLdb导入那里。在

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值