问题描述
我找不到一个完整的示例,说明如何从我编写的 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 包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)