我正在尝试构建一个Python模块(wsamdata)作为conda包。conda-build失败并显示错误消息(完整输出:https://pastebin.com/sKXNEcB6)
RuntimeError: Setuptools downloading is disabled in conda build.
Be sure to add all dependencies in the meta.yaml url=https://pypi.org/simple/click/click是一个依赖项,因此我将它包含在我的meta.yaml中(见下文),所以看到这条消息我有点困惑。
package:
name: wsamdata
version: 0.6.0
source:
git_rev: v0.6.0
git_url: https://github.com/kinverarity1/wsamdata
requirements:
build:
- python
- pip
- setuptools
- numpy
- pandas
- geopandas
- sqlparse
- click
- cx_Oracle
- pillow
- sqlalchemy
- python-sa-gwdata>=0.5.4
- lasio
run:
- python
- numpy
- pandas
- geopandas
- sqlparse
- click
- cx_Oracle
- pillow
- sqlalchemy
- python-sa-gwdata>=0.5.4
- lasio显然,click也包含在wsamdata包的setup.py文件中的install_requires=[...]下:
from setuptools import setup
setup(
name="wsamdata",
version="0.6.0",
packages=["wsamdata"],
install_requires=[
"python-sa-gwdata>=0.5.4",
"pandas",
"geopandas",
"sqlparse",
"click",
"cx_Oracle",
"pillow",
"numpy",
"sqlalchemy",
"lasio",
]
)我不能分享wsamdata的源代码,所以我知道这不是一个可重复的例子,但我被卡住了,我想知道我是否遗漏了一些明显的东西。我已经能够在这台机器上成功地使用conda-build为python-sa-gwdata构建一个conda包。
我还发现了其他类似的问题,但它们与生成缺少要求的meta.yaml文件的conda skeleton设置有关。相反,我从头开始编写这个meta.yaml。
我的.condarc文件:
channels:
- kinverarity
- conda-forge
- defaults
ssl_verify: true
auto_update_conda: true
always_yes: true
show_channel_urls: true
create_default_packages:
- pip
- black
pip_interop_enabled: true
anaconda_upload: false发布于 2020-11-14 01:07:15
为了防止任何人偶然发现这一点,我遇到了同样的问题,并使用
--single-version-externally-managed --record=record.txt
pip install命令中的选项,如anaconda cloud documentation中所建议
如果您使用的是build.sh或bld.bat,请尝试:
$PYTHON setup.py install --single-version-externally-managed --record=record.txt或
"%PYTHON%" setup.py install --single-version-externally-managed --record=record.txt,分别。
或者,您可以将以下内容添加到您的meta.yaml:
build:
script: {{ PYTHON }} setup.py install --single-version-externally-managed --record=record.txt或者,如果您使用的是conda skeleton,则pypi.org中已存在软件包:
build:
script: {{ PYTHON }} -m pip install . --single-version-externally-managed --record=record.txt --no-deps --ignore-installed --no-cache-dir -vvv发布于 2019-11-15 05:45:18
我也遇到过这个问题,其根源在于与meta.yaml文件相比,setup.py/requirements.txt文件中的版本信息存在冲突。查看那里,确保所有版本的规格都是相同的。多亏了这里的ML帖子,我才被引导到这个位置:
https://groups.google.com/a/continuum.io/forum/#!msg/anaconda/dELRaivwdMg/5IWgDcdqAwAJ
https://stackoverflow.com/questions/57387075
复制相似问题