build conda package from local python package(从本地 python 包构建 conda 包)
问题描述
我找不到一个完整的示例,说明如何从我编写的 python 包创建 conda 包,以及如何使用 conda install 安装包,而它在我的计算机上而不是在 anaconda 云上.例如,我正在寻找不使用 pypi 的 conda 骨架,而是在我的 windows 机器上使用 python 包,源代码必须在我的 windows 机器上,而不是在 pypi 或其他云上.任何帮助都会很重要.非常感谢
I can't find a complete example of how to create a conda package from a python package that I wrote and also how to install the package using conda install, while it is on my computer and not on anaconda cloud. I'm looking for example that not using conda skeleton from pypi, but using a python package on my windows machine, the source code must be on my windows machine and not on pypi or other cloud. any help would be mostly appriciate. thanks very much
推荐答案
可以在元数据文件 meta.yaml 中指定一个本地源目录,方法是:
A local source directory can be specified in the metadata file meta.yaml by using:
source:
path: ../src
https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#source-from-a-local-path
此外,要打包您自己的程序,您必须定义构建和安装它所需的步骤(例如,为使用 setuptools 的 python 脚本运行 setup.py install:https://setuptools.readthedocs.io/en/latest/index.html) 文件 build.sh for linux 和用于 Windows 的 bld.bat.
Additionally, to package your own program you have to define the steps needed to build and install it (for instance, running setup.py install for a python script that uses setuptools: https://setuptools.readthedocs.io/en/latest/index.html) in the files build.sh for linux and bld.bat for windows.
这篇关于从本地 python 包构建 conda 包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:从本地 python 包构建 conda 包
基础教程推荐
- PermissionError: pip 从 8.1.1 升级到 8.1.2 2022-01-01
- 无法导入 Pytorch [WinError 126] 找不到指定的模块 2022-01-01
- 在Python中从Azure BLOB存储中读取文件 2022-01-01
- PANDA VALUE_COUNTS包含GROUP BY之前的所有值 2022-01-01
- 修改列表中的数据帧不起作用 2022-01-01
- 使用大型矩阵时禁止 Pycharm 输出中的自动换行符 2022-01-01
- 包装空间模型 2022-01-01
- Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙? 2022-01-01
- 求两个直方图的卷积 2022-01-01
- 在同一图形上绘制Bokeh的烛台和音量条 2022-01-01
