我尝试使用以下方法安装我的python包:
python setup.py install
我的setup.py看起来像这样:
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)
我的问题是虽然安装了mysql-python。它尝试将MySQLdb作为包安装。它看起来像扫描所有文件的已用包并尝试安装它们。但是这是不可能的,因为没有名为MySQLdb的包只有mysql-python。
以下是我收到的错误:
{{1}}
如果我使用 pip install。 我得到了基本相同的错误:
{{1}}
MySQLdb包似乎在其他python文件中被发现,这些文件是projekt的一部分。我导入包作为导入MySQLdb。