康达建立忽略我激活的环境? [英] conda build ignoring my activated environment?
问题描述
我创建了一个Python 3 Conda环境,专门用于测试是否可以针对Python 3(而不是2)针对特定的软件包进行构建.但是,当我从该环境启动conda build
时,它会似乎想针对Python 2.7:
I've created a Python 3 Conda environment, expressly for the purpose of testing whether a particular package could be built, targeting Python 3, as opposed to 2. However, when I launch a conda build
from this environment, it appears to want to target Python 2.7:
(pybert_py3) Davids-MacBook-Air-2:PyBERT dbanas$ conda build conda.recipe/chaco/
BUILD START: chaco-4.6.1-py27_0
我在meta.yaml
文件中什么都找不到,该文件将构建指向Python 2.7.有谁知道这是怎么回事,以及我如何直接在Python 3上构建此版本?
I can find nothing in the meta.yaml
file, which is directing the build towards Python 2.7. Does anyone know what's going on, here, and how I direct this build at Python 3?
推荐答案
Conda不使用您的环境:
Conda does not use your environment:
https://docs.conda.io/projects/conda-build/zh-CN/latest/concepts/recipe.html
- 创建一个构建环境并在其中安装构建依赖项.
因此,您需要显式设置Python版本:
Therefore, you need to set the Python version explicitly:
-python PYTHON_VER设置conda构建使用的Python版本.
--python PYTHON_VER Set the Python version used by conda build.
尝试:
conda build --python=3.6 conda.recipe/chaco/
这篇关于康达建立忽略我激活的环境?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!