user308827
user308827

Reputation: 21961

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. However, it also needs a small number of libraries that are installed via pip. What is the best way to automate the installation of this mix of conda-forge and pip libraries when someone installs my package?

Upvotes: 0

Views: 444

Answers (1)

dsm
dsm

Reputation: 2253

Conda's environment.yml file can take both conda dependencies and pip dependencies. 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.

Upvotes: 2

Related Questions