mon*_*ula 5 python anaconda conda conda-build
我正在尝试创建一个 anaconda python 包。我的meta.yaml看起来像这样:
package:
name: liveprint-lib
version: "0.1.0"
build:
number: 0
requirements:
build:
- pip
- python=3.7
- setuptools
run:
- python=3.7
- numpy
- opencv
about:
home: https://github.com/monomonedula/liveprint
license: Apache License 2.0
license_file: LICENSE.txt
summary: Python utility library for dynamic animations projections
Run Code Online (Sandbox Code Playgroud)
build.sh:
$PYTHON setup.py install
Run Code Online (Sandbox Code Playgroud)
文件夹结构:
.
??? bld.bat
??? build.sh
??? LICENSE.txt
??? liveprint
??? meta.yaml
??? README.md
??? resources
??? setup.py
??? test
Run Code Online (Sandbox Code Playgroud)
我运行时得到的错误conda build .如下:
/home/vhhl/programs/anaconda3/conda-bld/liveprint-lib_1581422598848/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/bin/python: can't open file 'setup.py': [Errno 2] No such file or directory
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
您的meta.yaml文件缺少一个source部分。另外,通常最好将配方文件保存在自己的目录中,而不是放在顶级存储库中。我推荐以下内容:
mkdir conda-recipe
mv meta.yaml build.sh bld.bat conda-recipe
Run Code Online (Sandbox Code Playgroud)
然后,编辑meta.yaml以添加一个source部分,该部分指向存储库的顶级目录。
mkdir conda-recipe
mv meta.yaml build.sh bld.bat conda-recipe
Run Code Online (Sandbox Code Playgroud)
然后尝试:
conda build conda-recipe
Run Code Online (Sandbox Code Playgroud)