[英]Automating install of a mix of conda-forge and pip python libraries
I have a python package for which I need some other python libraries that are installed via conda-forge.我有一个 python package,我需要通过 conda-forge 安装的其他一些 python 库。 However, it also needs a small number of libraries that are installed via pip.
但是,它还需要通过 pip 安装的少量库。 What is the best way to automate the installation of this mix of conda-forge and pip libraries when someone installs my package?
当有人安装我的 package 时,自动安装 conda-forge 和 pip 库的最佳方法是什么?
Conda's environment.yml
file can take both conda dependencies and pip dependencies. Conda 的
environment.yml
文件可以同时获取 conda 依赖项和 pip 依赖项。 I'll paste in from the docs :我将从文档中粘贴:
name: stats2
channels:
- javascript
dependencies:
- python=3.9
- bokeh=2.4.2
- numpy=1.21.*
- nodejs=16.13.*
- flask
- pip
- pip:
- Flask-Testing
The pip
array at the end lists stuff you'd like to pull from PyPI rather than from conda repositories.最后的
pip
数组列出了您希望从 PyPI 而不是从 conda 存储库中提取的内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.