conda依赖项未安装在本地软件包构建中 [英] conda dependencies do not install on local package build

查看:203
本文介绍了conda依赖项未安装在本地软件包构建中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 conda-build 构建Python软件包。现在,我的结构如下所示:

I am building a Python package using conda-build. Right now my structure looks like this:

- my_recipe/
    - meta.yaml
    - build.sh

我的 meta.yaml 读为:

package:
  name: my_pkg
version: "0.2.0"

source:
  path: ../my_pkg

requirements:
  build:
    - python
    - setuptools
  run:
    - python
    - pandas
    - numpy
    - plotly
    - matplotlib
    - pyqtgraph
    - pyopengl
    - gdal
    - scipy
    - scikit-image

我运行时程序包本身正确构建

The package itself builds correctly when I run

conda-build my_recipe /

安装成功当我运行

conda install -n my_env --use-local〜/ miniconda3 / envs / my_env / conda-bld / linux-64 / my_pkg-0.2.0-py36_0.tar.bz2

但是, run 似乎与软件包一起安装(例如,当我在Python中导入软件包时,它说 pandas 不能

However, none of the dependencies listed under run seem to install along with the package (for example, when I import the package in Python it says that pandas could not be found).

我的依赖项是否列在正确的位置?我还需要在 setup.py 中列出依赖项吗?该文档对于应在何处提供这些信息尚不十分清楚。

Are my dependencies listed in the correct location? Do I also need to list the dependencies in setup.py? The documentation is not very clear on where this information should be.

推荐答案

我发现使用-按预期,在安装本地软件包时,-update-deps 标志确实会安装软件包的依赖项。像这样:

I found that using the --update-deps flag when installing a local package does install the package's dependencies, as expected. Like this:

conda install --use-local --update-deps my-package-name

这篇关于conda依赖项未安装在本地软件包构建中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆