conda build ignoring my activated environment?

倖福魔咒の 提交于 2020-02-24 20:53:16

问题


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

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?


回答1:


Conda does not use your environment:

https://docs.conda.io/projects/conda-build/en/latest/concepts/recipe.html

  1. Creates a build environment and installs the build dependencies there.

Therefore, you need to set the Python version explicitly:

--python PYTHON_VER Set the Python version used by conda build.

Try:

conda build --python=3.6 conda.recipe/chaco/


来源:https://stackoverflow.com/questions/44346018/conda-build-ignoring-my-activated-environment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!