如何使用conda安装本地包
How to install local package with conda
我有一个名为 jive
的本地 python 项目,我想在另一个项目中使用它。我目前在其他项目中使用jive
的方法是为该项目激活conda env,然后移动到我的jive
目录并使用python setup.py install
。这工作正常,当我使用 conda list
时,我看到环境中安装的所有内容,包括 jive
,并注意 jive
是使用 pip 安装的。
但我真正想要的是用完整的 conda 来做这件事。当我想在另一个项目中使用 jive
时,我只想将 jive
放入该项目 environment.yml
.
所以我做了以下事情:
- 写一个简单的
meta.yaml
这样我就可以使用 conda-build 在本地构建 jive
- 用
conda build .
构建 jive
- 我查看了生成的 tarball,它确实包含预期的
jive
源代码
- 在我的其他项目中,将 jive 添加到
environment.yml
中的依赖项,并将 'local' 添加到频道列表中。
- 使用 environment.yml 创建一个 conda env。
当我激活环境并使用 conda list
时,它会根据需要列出所有依赖项,包括 jive
。但是当我打开python解释器时,我不能import jive
,它说没有这个包。 (如果使用python setup.py install
,我可以导入它。)
我怎样才能修复 build/install 使其正常工作?
这是 meta.yaml,它位于 jive
项目顶级目录中:
package:
name: jive
version: "0.2.1"
source:
path: .
build:
script: python -m pip install --no-deps --ignore-installed .
requirements:
host:
- python>=3.5
- pip
- setuptools
run:
- python>=3.5
- numpy
- pandas
- scipy
- seaborn
- matplotlib
- scikit-learn
- statsmodels
- joblib
- bokeh
test:
imports: jive
这里是 conda build .
的输出
No numpy version specified in conda_build_config.yaml. Falling back to default numpy value of 1.16
WARNING:conda_build.metadata:No numpy version specified in conda_build_config.yaml. Falling back to default numpy value of 1.16
Adding in variants from internal_defaults
INFO:conda_build.variants:Adding in variants from internal_defaults
Adding in variants from /Users/thomaskeefe/.conda/conda_build_config.yaml
INFO:conda_build.variants:Adding in variants from /Users/thomaskeefe/.conda/conda_build_config.yaml
Attempting to finalize metadata for jive
INFO:conda_build.metadata:Attempting to finalize metadata for jive
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
BUILD START: ['jive-0.2.1-py310_0.tar.bz2']
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
## Package Plan ##
environment location: /opt/miniconda3/conda-bld/jive_1642185595622/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla
The following NEW packages will be INSTALLED:
bzip2: 1.0.8-h1de35cc_0
ca-certificates: 2021.10.26-hecd8cb5_2
certifi: 2021.5.30-py310hecd8cb5_0
libcxx: 12.0.0-h2f01273_0
libffi: 3.3-hb1e8313_2
ncurses: 6.3-hca72f7f_2
openssl: 1.1.1m-hca72f7f_0
pip: 21.2.4-py310hecd8cb5_0
python: 3.10.0-hdfd78df_3
readline: 8.1.2-hca72f7f_1
setuptools: 58.0.4-py310hecd8cb5_0
sqlite: 3.37.0-h707629a_0
tk: 8.6.11-h7bc2e8c_0
tzdata: 2021e-hda174b7_0
wheel: 0.37.1-pyhd3eb1b0_0
xz: 5.2.5-h1de35cc_0
zlib: 1.2.11-h4dc903c_4
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
Copying /Users/thomaskeefe/Documents/py_jive to /opt/miniconda3/conda-bld/jive_1642185595622/work/
source tree in: /opt/miniconda3/conda-bld/jive_1642185595622/work
export PREFIX=/opt/miniconda3/conda-bld/jive_1642185595622/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla
export BUILD_PREFIX=/opt/miniconda3/conda-bld/jive_1642185595622/_build_env
export SRC_DIR=/opt/miniconda3/conda-bld/jive_1642185595622/work
Processing $SRC_DIR
DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
Building wheels for collected packages: jive
Building wheel for jive (setup.py): started
Building wheel for jive (setup.py): finished with status 'done'
Created wheel for jive: filename=jive-0.2.1-py3-none-any.whl size=46071 sha256=b312955cb2fd917bc4e684a575407b884190680f2dddad7fcb9ac25e5b290fc9
Stored in directory: /private/tmp/pip-ephem-wheel-cache-rbpkt2an/wheels/15/68/82/4ed7cd246fbc4c72cf764b425a03230247589bd2394a7e457b
Successfully built jive
Installing collected packages: jive
Successfully installed jive-0.2.1
Resource usage statistics from building jive:
Process count: 3
CPU time: Sys=0:00:00.3, User=0:00:00.5
Memory: 53.7M
Disk usage: 50.4K
Time elapsed: 0:00:06.1
Packaging jive
INFO:conda_build.build:Packaging jive
INFO conda_build.build:build(2289): Packaging jive
Packaging jive-0.2.1-py310_0
INFO:conda_build.build:Packaging jive-0.2.1-py310_0
INFO conda_build.build:bundle_conda(1529): Packaging jive-0.2.1-py310_0
compiling .pyc files...
number of files: 70
Fixing permissions
INFO :: Time taken to mark (prefix)
0 replacements in 0 files was 0.06 seconds
TEST START: /opt/miniconda3/conda-bld/osx-64/jive-0.2.1-py310_0.tar.bz2
Adding in variants from /var/folders/dd/t85p2jdn3sd11bsdnl7th6p00000gn/T/tmp4o3im7d1/info/recipe/conda_build_config.yaml
INFO:conda_build.variants:Adding in variants from /var/folders/dd/t85p2jdn3sd11bsdnl7th6p00000gn/T/tmp4o3im7d1/info/recipe/conda_build_config.yaml
INFO conda_build.variants:_combine_spec_dictionaries(234): Adding in variants from /var/folders/dd/t85p2jdn3sd11bsdnl7th6p00000gn/T/tmp4o3im7d1/info/recipe/conda_build_config.yaml
Renaming work directory '/opt/miniconda3/conda-bld/jive_1642185595622/work' to '/opt/miniconda3/conda-bld/jive_1642185595622/work_moved_jive-0.2.1-py310_0_osx-64'
INFO:conda_build.utils:Renaming work directory '/opt/miniconda3/conda-bld/jive_1642185595622/work' to '/opt/miniconda3/conda-bld/jive_1642185595622/work_moved_jive-0.2.1-py310_0_osx-64'
INFO conda_build.utils:shutil_move_more_retrying(2091): Renaming work directory '/opt/miniconda3/conda-bld/jive_1642185595622/work' to '/opt/miniconda3/conda-bld/jive_1642185595622/work_moved_jive-0.2.1-py310_0_osx-64'
shutil.move(work)=/opt/miniconda3/conda-bld/jive_1642185595622/work, dest=/opt/miniconda3/conda-bld/jive_1642185595622/work_moved_jive-0.2.1-py310_0_osx-64)
INFO:conda_build.utils:shutil.move(work)=/opt/miniconda3/conda-bld/jive_1642185595622/work, dest=/opt/miniconda3/conda-bld/jive_1642185595622/work_moved_jive-0.2.1-py310_0_osx-64)
INFO conda_build.utils:shutil_move_more_retrying(2098): shutil.move(work)=/opt/miniconda3/conda-bld/jive_1642185595622/work, dest=/opt/miniconda3/conda-bld/jive_1642185595622/work_moved_jive-0.2.1-py310_0_osx-64)
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
## Package Plan ##
environment location: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol
The following NEW packages will be INSTALLED:
blas: 1.0-mkl
bokeh: 2.4.2-py39hecd8cb5_0
bottleneck: 1.3.2-py39he3068b8_1
brotli: 1.0.9-hb1e8313_2
ca-certificates: 2021.10.26-hecd8cb5_2
certifi: 2021.10.8-py39hecd8cb5_2
cycler: 0.11.0-pyhd3eb1b0_0
fonttools: 4.25.0-pyhd3eb1b0_0
freetype: 2.11.0-hd8bbffd_0
giflib: 5.2.1-haf1e3a3_0
intel-openmp: 2021.4.0-hecd8cb5_3538
jinja2: 3.0.2-pyhd3eb1b0_0
jive: 0.2.1-py310_0 local
joblib: 1.1.0-pyhd3eb1b0_0
jpeg: 9d-h9ed2024_0
kiwisolver: 1.3.1-py39h23ab428_0
lcms2: 2.12-hf1fd2bf_0
libcxx: 12.0.0-h2f01273_0
libffi: 3.3-hb1e8313_2
libgfortran: 3.0.1-h93005f0_2
libpng: 1.6.37-ha441bb4_0
libtiff: 4.2.0-h87d7836_0
libwebp: 1.2.0-hacca55c_0
libwebp-base: 1.2.0-h9ed2024_0
llvm-openmp: 12.0.0-h0dcd299_1
lz4-c: 1.9.3-h23ab428_1
markupsafe: 2.0.1-py39h9ed2024_0
matplotlib: 3.5.0-py39hecd8cb5_0
matplotlib-base: 3.5.0-py39h4f681db_0
mkl: 2021.4.0-hecd8cb5_637
mkl-service: 2.4.0-py39h9ed2024_0
mkl_fft: 1.3.1-py39h4ab4a9b_0
mkl_random: 1.2.2-py39hb2f4e1b_0
munkres: 1.1.4-py_0
ncurses: 6.3-hca72f7f_2
numexpr: 2.8.1-py39h2e5f0a9_0
numpy: 1.21.2-py39h4b4dc7a_0
numpy-base: 1.21.2-py39he0bd621_0
olefile: 0.46-pyhd3eb1b0_0
openssl: 1.1.1m-hca72f7f_0
packaging: 21.3-pyhd3eb1b0_0
pandas: 1.3.5-py39h743cdd8_0
patsy: 0.5.2-py39hecd8cb5_0
pillow: 8.4.0-py39h98e4679_0
pip: 21.2.4-py39hecd8cb5_0
pyparsing: 3.0.4-pyhd3eb1b0_0
python: 3.9.7-h88f2d9e_1
python-dateutil: 2.8.2-pyhd3eb1b0_0
pytz: 2021.3-pyhd3eb1b0_0
pyyaml: 6.0-py39hca72f7f_1
readline: 8.1.2-hca72f7f_1
scikit-learn: 1.0.2-py39hae1ba45_0
scipy: 1.7.3-py39h8c7af03_0
seaborn: 0.11.2-pyhd3eb1b0_0
setuptools: 58.0.4-py39hecd8cb5_0
six: 1.16.0-pyhd3eb1b0_0
sqlite: 3.37.0-h707629a_0
statsmodels: 0.13.0-py39hca72f7f_0
threadpoolctl: 2.2.0-pyh0d69192_0
tk: 8.6.11-h7bc2e8c_0
tornado: 6.1-py39h9ed2024_0
typing_extensions: 3.10.0.2-pyh06a4308_0
tzdata: 2021e-hda174b7_0
wheel: 0.37.1-pyhd3eb1b0_0
xz: 5.2.5-h1de35cc_0
yaml: 0.2.5-haf1e3a3_0
zlib: 1.2.11-h4dc903c_4
zstd: 1.4.9-h322a384_0
Preparing transaction: ...working... done
Verifying transaction: ...working...
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::intel-openmp-2021.4.0-hecd8cb5_3538, defaults/osx-64::llvm-openmp-12.0.0-h0dcd299_1
path: 'lib/libiomp5.dylib'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'bin/webpinfo'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'bin/webpmux'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'include/webp/decode.h'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'include/webp/encode.h'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'include/webp/mux.h'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'include/webp/mux_types.h'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'include/webp/types.h'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/libwebp.7.dylib'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/libwebp.a'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/libwebp.dylib'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/libwebpdecoder.3.dylib'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/libwebpdecoder.a'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/libwebpdecoder.dylib'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/libwebpmux.3.dylib'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/libwebpmux.a'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/libwebpmux.dylib'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/pkgconfig/libwebp.pc'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/pkgconfig/libwebpdecoder.pc'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/pkgconfig/libwebpmux.pc'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'share/man/man1/cwebp.1'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'share/man/man1/dwebp.1'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'share/man/man1/webpinfo.1'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'share/man/man1/webpmux.1'
done
Executing transaction: ...working...
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/llvm-openmp-12.0.0-h0dcd299_1/lib/libiomp5.dylib
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/libiomp5.dylib
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/bin/webpinfo
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/bin/webpinfo
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/bin/webpmux
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/bin/webpmux
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/include/webp/decode.h
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/include/webp/decode.h
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/include/webp/encode.h
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/include/webp/encode.h
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/include/webp/mux.h
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/include/webp/mux.h
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/include/webp/mux_types.h
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/include/webp/mux_types.h
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/include/webp/types.h
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/include/webp/types.h
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/lib/libwebp.7.dylib
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/libwebp.7.dylib
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/lib/libwebp.a
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/libwebp.a
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/lib/libwebp.dylib
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/libwebp.dylib
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/lib/libwebpdecoder.3.dylib
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/libwebpdecoder.3.dylib
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/lib/libwebpdecoder.a
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/libwebpdecoder.a
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/lib/libwebpdecoder.dylib
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/libwebpdecoder.dylib
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/lib/libwebpmux.3.dylib
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/libwebpmux.3.dylib
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/lib/libwebpmux.a
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/libwebpmux.a
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/lib/libwebpmux.dylib
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/libwebpmux.dylib
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/.condatmp/1018f8ab-87a7-4fa8-a41c-4c14cc77cfff
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/pkgconfig/libwebp.pc
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/.condatmp/e3701fae-f2cd-44e9-9dc6-c71f499cd2c2
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/pkgconfig/libwebpdecoder.pc
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/.condatmp/0f4bcf50-01e5-404d-b1a4-8a87d45c22c5
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/pkgconfig/libwebpmux.pc
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/share/man/man1/cwebp.1
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/share/man/man1/cwebp.1
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/share/man/man1/dwebp.1
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/share/man/man1/dwebp.1
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/share/man/man1/webpinfo.1
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/share/man/man1/webpinfo.1
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/share/man/man1/webpmux.1
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/share/man/man1/webpmux.1
Installed package of scikit-learn can be accelerated using scikit-learn-intelex.
More details are available here: https://intel.github.io/scikit-learn-intelex
For example:
$ conda install scikit-learn-intelex
$ python -m sklearnex my_application.py
done
export PREFIX=/opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol
export SRC_DIR=/opt/miniconda3/conda-bld/jive_1642185595622/test_tmp
Traceback (most recent call last):
File "/opt/miniconda3/conda-bld/jive_1642185595622/test_tmp/run_test.py", line 2, in <module>
import jive
ModuleNotFoundError: No module named 'jive'
import: 'jive'
Tests failed for jive-0.2.1-py310_0.tar.bz2 - moving package to /opt/miniconda3/conda-bld/broken
WARNING:conda_build.build:Tests failed for jive-0.2.1-py310_0.tar.bz2 - moving package to /opt/miniconda3/conda-bld/broken
WARNING conda_build.build:tests_failed(2970): Tests failed for jive-0.2.1-py310_0.tar.bz2 - moving package to /opt/miniconda3/conda-bld/broken
TESTS FAILED: jive-0.2.1-py310_0.tar.bz2
编辑:我按照 merv 的建议在 meta.yaml 中添加了一个 test:
部分。
直接错误是构建正在生成 Python 3.10 版本,但在测试时 Conda 无法识别 Python 版本的任何约束,并创建 Python 3.9环境。
我认为主要问题是 python >=3.5
只是在进行 noarch
构建时的有效约束,而这不是。也就是说,一旦使用给定的 Python 版本构建包,该版本必须严格限制为该版本(从次要版本开始)。因此,在这种情况下,该包是使用 Python 3.10 构建的,但它在其元数据中报告它与 Python 3.5+ 的所有版本兼容,这根本不是真的,因为 Conda Python 包将模块安装到 Python-版本特定的 site-packages
(例如,lib/python-3.10/site-packages/jive
)。
通常,Python 版本由给定 conda-build
的 --python
参数或 conda_build_config.yaml
文件提供的矩阵控制(参见 documentation on "Build variants" ).
尝试将 meta.yaml
调整为
package:
name: jive
version: "0.2.1"
source:
path: .
build:
script: python -m pip install --no-deps --ignore-installed .
requirements:
host:
- python
- pip
- setuptools
run:
- python
- numpy
- pandas
- scipy
- seaborn
- matplotlib
- scikit-learn
- statsmodels
- joblib
- bokeh
如果你想在Python 3.9环境下使用它,那么使用conda build --python 3.9 .
。
我有一个名为 jive
的本地 python 项目,我想在另一个项目中使用它。我目前在其他项目中使用jive
的方法是为该项目激活conda env,然后移动到我的jive
目录并使用python setup.py install
。这工作正常,当我使用 conda list
时,我看到环境中安装的所有内容,包括 jive
,并注意 jive
是使用 pip 安装的。
但我真正想要的是用完整的 conda 来做这件事。当我想在另一个项目中使用 jive
时,我只想将 jive
放入该项目 environment.yml
.
所以我做了以下事情:
- 写一个简单的
meta.yaml
这样我就可以使用 conda-build 在本地构建jive
- 用
conda build .
构建 jive
- 我查看了生成的 tarball,它确实包含预期的
jive
源代码 - 在我的其他项目中,将 jive 添加到
environment.yml
中的依赖项,并将 'local' 添加到频道列表中。 - 使用 environment.yml 创建一个 conda env。
当我激活环境并使用 conda list
时,它会根据需要列出所有依赖项,包括 jive
。但是当我打开python解释器时,我不能import jive
,它说没有这个包。 (如果使用python setup.py install
,我可以导入它。)
我怎样才能修复 build/install 使其正常工作?
这是 meta.yaml,它位于 jive
项目顶级目录中:
package:
name: jive
version: "0.2.1"
source:
path: .
build:
script: python -m pip install --no-deps --ignore-installed .
requirements:
host:
- python>=3.5
- pip
- setuptools
run:
- python>=3.5
- numpy
- pandas
- scipy
- seaborn
- matplotlib
- scikit-learn
- statsmodels
- joblib
- bokeh
test:
imports: jive
这里是 conda build .
No numpy version specified in conda_build_config.yaml. Falling back to default numpy value of 1.16
WARNING:conda_build.metadata:No numpy version specified in conda_build_config.yaml. Falling back to default numpy value of 1.16
Adding in variants from internal_defaults
INFO:conda_build.variants:Adding in variants from internal_defaults
Adding in variants from /Users/thomaskeefe/.conda/conda_build_config.yaml
INFO:conda_build.variants:Adding in variants from /Users/thomaskeefe/.conda/conda_build_config.yaml
Attempting to finalize metadata for jive
INFO:conda_build.metadata:Attempting to finalize metadata for jive
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
BUILD START: ['jive-0.2.1-py310_0.tar.bz2']
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
## Package Plan ##
environment location: /opt/miniconda3/conda-bld/jive_1642185595622/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla
The following NEW packages will be INSTALLED:
bzip2: 1.0.8-h1de35cc_0
ca-certificates: 2021.10.26-hecd8cb5_2
certifi: 2021.5.30-py310hecd8cb5_0
libcxx: 12.0.0-h2f01273_0
libffi: 3.3-hb1e8313_2
ncurses: 6.3-hca72f7f_2
openssl: 1.1.1m-hca72f7f_0
pip: 21.2.4-py310hecd8cb5_0
python: 3.10.0-hdfd78df_3
readline: 8.1.2-hca72f7f_1
setuptools: 58.0.4-py310hecd8cb5_0
sqlite: 3.37.0-h707629a_0
tk: 8.6.11-h7bc2e8c_0
tzdata: 2021e-hda174b7_0
wheel: 0.37.1-pyhd3eb1b0_0
xz: 5.2.5-h1de35cc_0
zlib: 1.2.11-h4dc903c_4
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
Copying /Users/thomaskeefe/Documents/py_jive to /opt/miniconda3/conda-bld/jive_1642185595622/work/
source tree in: /opt/miniconda3/conda-bld/jive_1642185595622/work
export PREFIX=/opt/miniconda3/conda-bld/jive_1642185595622/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla
export BUILD_PREFIX=/opt/miniconda3/conda-bld/jive_1642185595622/_build_env
export SRC_DIR=/opt/miniconda3/conda-bld/jive_1642185595622/work
Processing $SRC_DIR
DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
Building wheels for collected packages: jive
Building wheel for jive (setup.py): started
Building wheel for jive (setup.py): finished with status 'done'
Created wheel for jive: filename=jive-0.2.1-py3-none-any.whl size=46071 sha256=b312955cb2fd917bc4e684a575407b884190680f2dddad7fcb9ac25e5b290fc9
Stored in directory: /private/tmp/pip-ephem-wheel-cache-rbpkt2an/wheels/15/68/82/4ed7cd246fbc4c72cf764b425a03230247589bd2394a7e457b
Successfully built jive
Installing collected packages: jive
Successfully installed jive-0.2.1
Resource usage statistics from building jive:
Process count: 3
CPU time: Sys=0:00:00.3, User=0:00:00.5
Memory: 53.7M
Disk usage: 50.4K
Time elapsed: 0:00:06.1
Packaging jive
INFO:conda_build.build:Packaging jive
INFO conda_build.build:build(2289): Packaging jive
Packaging jive-0.2.1-py310_0
INFO:conda_build.build:Packaging jive-0.2.1-py310_0
INFO conda_build.build:bundle_conda(1529): Packaging jive-0.2.1-py310_0
compiling .pyc files...
number of files: 70
Fixing permissions
INFO :: Time taken to mark (prefix)
0 replacements in 0 files was 0.06 seconds
TEST START: /opt/miniconda3/conda-bld/osx-64/jive-0.2.1-py310_0.tar.bz2
Adding in variants from /var/folders/dd/t85p2jdn3sd11bsdnl7th6p00000gn/T/tmp4o3im7d1/info/recipe/conda_build_config.yaml
INFO:conda_build.variants:Adding in variants from /var/folders/dd/t85p2jdn3sd11bsdnl7th6p00000gn/T/tmp4o3im7d1/info/recipe/conda_build_config.yaml
INFO conda_build.variants:_combine_spec_dictionaries(234): Adding in variants from /var/folders/dd/t85p2jdn3sd11bsdnl7th6p00000gn/T/tmp4o3im7d1/info/recipe/conda_build_config.yaml
Renaming work directory '/opt/miniconda3/conda-bld/jive_1642185595622/work' to '/opt/miniconda3/conda-bld/jive_1642185595622/work_moved_jive-0.2.1-py310_0_osx-64'
INFO:conda_build.utils:Renaming work directory '/opt/miniconda3/conda-bld/jive_1642185595622/work' to '/opt/miniconda3/conda-bld/jive_1642185595622/work_moved_jive-0.2.1-py310_0_osx-64'
INFO conda_build.utils:shutil_move_more_retrying(2091): Renaming work directory '/opt/miniconda3/conda-bld/jive_1642185595622/work' to '/opt/miniconda3/conda-bld/jive_1642185595622/work_moved_jive-0.2.1-py310_0_osx-64'
shutil.move(work)=/opt/miniconda3/conda-bld/jive_1642185595622/work, dest=/opt/miniconda3/conda-bld/jive_1642185595622/work_moved_jive-0.2.1-py310_0_osx-64)
INFO:conda_build.utils:shutil.move(work)=/opt/miniconda3/conda-bld/jive_1642185595622/work, dest=/opt/miniconda3/conda-bld/jive_1642185595622/work_moved_jive-0.2.1-py310_0_osx-64)
INFO conda_build.utils:shutil_move_more_retrying(2098): shutil.move(work)=/opt/miniconda3/conda-bld/jive_1642185595622/work, dest=/opt/miniconda3/conda-bld/jive_1642185595622/work_moved_jive-0.2.1-py310_0_osx-64)
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
## Package Plan ##
environment location: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol
The following NEW packages will be INSTALLED:
blas: 1.0-mkl
bokeh: 2.4.2-py39hecd8cb5_0
bottleneck: 1.3.2-py39he3068b8_1
brotli: 1.0.9-hb1e8313_2
ca-certificates: 2021.10.26-hecd8cb5_2
certifi: 2021.10.8-py39hecd8cb5_2
cycler: 0.11.0-pyhd3eb1b0_0
fonttools: 4.25.0-pyhd3eb1b0_0
freetype: 2.11.0-hd8bbffd_0
giflib: 5.2.1-haf1e3a3_0
intel-openmp: 2021.4.0-hecd8cb5_3538
jinja2: 3.0.2-pyhd3eb1b0_0
jive: 0.2.1-py310_0 local
joblib: 1.1.0-pyhd3eb1b0_0
jpeg: 9d-h9ed2024_0
kiwisolver: 1.3.1-py39h23ab428_0
lcms2: 2.12-hf1fd2bf_0
libcxx: 12.0.0-h2f01273_0
libffi: 3.3-hb1e8313_2
libgfortran: 3.0.1-h93005f0_2
libpng: 1.6.37-ha441bb4_0
libtiff: 4.2.0-h87d7836_0
libwebp: 1.2.0-hacca55c_0
libwebp-base: 1.2.0-h9ed2024_0
llvm-openmp: 12.0.0-h0dcd299_1
lz4-c: 1.9.3-h23ab428_1
markupsafe: 2.0.1-py39h9ed2024_0
matplotlib: 3.5.0-py39hecd8cb5_0
matplotlib-base: 3.5.0-py39h4f681db_0
mkl: 2021.4.0-hecd8cb5_637
mkl-service: 2.4.0-py39h9ed2024_0
mkl_fft: 1.3.1-py39h4ab4a9b_0
mkl_random: 1.2.2-py39hb2f4e1b_0
munkres: 1.1.4-py_0
ncurses: 6.3-hca72f7f_2
numexpr: 2.8.1-py39h2e5f0a9_0
numpy: 1.21.2-py39h4b4dc7a_0
numpy-base: 1.21.2-py39he0bd621_0
olefile: 0.46-pyhd3eb1b0_0
openssl: 1.1.1m-hca72f7f_0
packaging: 21.3-pyhd3eb1b0_0
pandas: 1.3.5-py39h743cdd8_0
patsy: 0.5.2-py39hecd8cb5_0
pillow: 8.4.0-py39h98e4679_0
pip: 21.2.4-py39hecd8cb5_0
pyparsing: 3.0.4-pyhd3eb1b0_0
python: 3.9.7-h88f2d9e_1
python-dateutil: 2.8.2-pyhd3eb1b0_0
pytz: 2021.3-pyhd3eb1b0_0
pyyaml: 6.0-py39hca72f7f_1
readline: 8.1.2-hca72f7f_1
scikit-learn: 1.0.2-py39hae1ba45_0
scipy: 1.7.3-py39h8c7af03_0
seaborn: 0.11.2-pyhd3eb1b0_0
setuptools: 58.0.4-py39hecd8cb5_0
six: 1.16.0-pyhd3eb1b0_0
sqlite: 3.37.0-h707629a_0
statsmodels: 0.13.0-py39hca72f7f_0
threadpoolctl: 2.2.0-pyh0d69192_0
tk: 8.6.11-h7bc2e8c_0
tornado: 6.1-py39h9ed2024_0
typing_extensions: 3.10.0.2-pyh06a4308_0
tzdata: 2021e-hda174b7_0
wheel: 0.37.1-pyhd3eb1b0_0
xz: 5.2.5-h1de35cc_0
yaml: 0.2.5-haf1e3a3_0
zlib: 1.2.11-h4dc903c_4
zstd: 1.4.9-h322a384_0
Preparing transaction: ...working... done
Verifying transaction: ...working...
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::intel-openmp-2021.4.0-hecd8cb5_3538, defaults/osx-64::llvm-openmp-12.0.0-h0dcd299_1
path: 'lib/libiomp5.dylib'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'bin/webpinfo'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'bin/webpmux'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'include/webp/decode.h'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'include/webp/encode.h'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'include/webp/mux.h'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'include/webp/mux_types.h'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'include/webp/types.h'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/libwebp.7.dylib'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/libwebp.a'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/libwebp.dylib'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/libwebpdecoder.3.dylib'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/libwebpdecoder.a'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/libwebpdecoder.dylib'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/libwebpmux.3.dylib'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/libwebpmux.a'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/libwebpmux.dylib'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/pkgconfig/libwebp.pc'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/pkgconfig/libwebpdecoder.pc'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'lib/pkgconfig/libwebpmux.pc'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'share/man/man1/cwebp.1'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'share/man/man1/dwebp.1'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'share/man/man1/webpinfo.1'
ClobberWarning: This transaction has incompatible packages due to a shared path.
packages: defaults/osx-64::libwebp-base-1.2.0-h9ed2024_0, defaults/osx-64::libwebp-1.2.0-hacca55c_0
path: 'share/man/man1/webpmux.1'
done
Executing transaction: ...working...
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/llvm-openmp-12.0.0-h0dcd299_1/lib/libiomp5.dylib
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/libiomp5.dylib
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/bin/webpinfo
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/bin/webpinfo
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/bin/webpmux
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/bin/webpmux
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/include/webp/decode.h
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/include/webp/decode.h
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/include/webp/encode.h
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/include/webp/encode.h
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/include/webp/mux.h
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/include/webp/mux.h
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/include/webp/mux_types.h
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/include/webp/mux_types.h
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/include/webp/types.h
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/include/webp/types.h
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/lib/libwebp.7.dylib
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/libwebp.7.dylib
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/lib/libwebp.a
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/libwebp.a
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/lib/libwebp.dylib
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/libwebp.dylib
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/lib/libwebpdecoder.3.dylib
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/libwebpdecoder.3.dylib
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/lib/libwebpdecoder.a
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/libwebpdecoder.a
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/lib/libwebpdecoder.dylib
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/libwebpdecoder.dylib
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/lib/libwebpmux.3.dylib
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/libwebpmux.3.dylib
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/lib/libwebpmux.a
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/libwebpmux.a
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/lib/libwebpmux.dylib
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/libwebpmux.dylib
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/.condatmp/1018f8ab-87a7-4fa8-a41c-4c14cc77cfff
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/pkgconfig/libwebp.pc
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/.condatmp/e3701fae-f2cd-44e9-9dc6-c71f499cd2c2
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/pkgconfig/libwebpdecoder.pc
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/.condatmp/0f4bcf50-01e5-404d-b1a4-8a87d45c22c5
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/pkgconfig/libwebpmux.pc
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/share/man/man1/cwebp.1
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/share/man/man1/cwebp.1
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/share/man/man1/dwebp.1
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/share/man/man1/dwebp.1
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/share/man/man1/webpinfo.1
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/share/man/man1/webpinfo.1
ClobberWarning: Conda was asked to clobber an existing path.
source path: /opt/miniconda3/pkgs/libwebp-1.2.0-hacca55c_0/share/man/man1/webpmux.1
target path: /opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/share/man/man1/webpmux.1
Installed package of scikit-learn can be accelerated using scikit-learn-intelex.
More details are available here: https://intel.github.io/scikit-learn-intelex
For example:
$ conda install scikit-learn-intelex
$ python -m sklearnex my_application.py
done
export PREFIX=/opt/miniconda3/conda-bld/jive_1642185595622/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol
export SRC_DIR=/opt/miniconda3/conda-bld/jive_1642185595622/test_tmp
Traceback (most recent call last):
File "/opt/miniconda3/conda-bld/jive_1642185595622/test_tmp/run_test.py", line 2, in <module>
import jive
ModuleNotFoundError: No module named 'jive'
import: 'jive'
Tests failed for jive-0.2.1-py310_0.tar.bz2 - moving package to /opt/miniconda3/conda-bld/broken
WARNING:conda_build.build:Tests failed for jive-0.2.1-py310_0.tar.bz2 - moving package to /opt/miniconda3/conda-bld/broken
WARNING conda_build.build:tests_failed(2970): Tests failed for jive-0.2.1-py310_0.tar.bz2 - moving package to /opt/miniconda3/conda-bld/broken
TESTS FAILED: jive-0.2.1-py310_0.tar.bz2
编辑:我按照 merv 的建议在 meta.yaml 中添加了一个 test:
部分。
直接错误是构建正在生成 Python 3.10 版本,但在测试时 Conda 无法识别 Python 版本的任何约束,并创建 Python 3.9环境。
我认为主要问题是 python >=3.5
只是在进行 noarch
构建时的有效约束,而这不是。也就是说,一旦使用给定的 Python 版本构建包,该版本必须严格限制为该版本(从次要版本开始)。因此,在这种情况下,该包是使用 Python 3.10 构建的,但它在其元数据中报告它与 Python 3.5+ 的所有版本兼容,这根本不是真的,因为 Conda Python 包将模块安装到 Python-版本特定的 site-packages
(例如,lib/python-3.10/site-packages/jive
)。
通常,Python 版本由给定 conda-build
的 --python
参数或 conda_build_config.yaml
文件提供的矩阵控制(参见 documentation on "Build variants" ).
尝试将 meta.yaml
调整为
package:
name: jive
version: "0.2.1"
source:
path: .
build:
script: python -m pip install --no-deps --ignore-installed .
requirements:
host:
- python
- pip
- setuptools
run:
- python
- numpy
- pandas
- scipy
- seaborn
- matplotlib
- scikit-learn
- statsmodels
- joblib
- bokeh
如果你想在Python 3.9环境下使用它,那么使用conda build --python 3.9 .
。