且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Mac OS X上使用Conda安装pyzbar时出错

更新时间:2022-11-25 19:41:50

是的,看来 pyzbar 无法通过 osx-64 平台的Anaconda Cloud渠道使用.取而代之的是,可以(谨慎地)混合使用PyPI和Conda软件包.例如,基本的YAML定义应类似于:

Yes, it looks like pyzbar is not available through Anaconda Cloud channels for osx-64 platform. Instead, one can (cautiously) mix PyPI and Conda packages. For example, a basic YAML definition would be something like:

zbar_env.yaml

name: zbar_env
channels:
 - conda-forge
 - defaults
dependencies:
 - python=3
 - zbar
 - pip
 - pip:
   - pyzbar

可以用以下方法实例化:

which can be instantiated with:

conda env create -f zbar_env.yaml

按照

As per the recommendations for mixing PyPI and Conda, place all requirements in this YAML file from the start. If you need to add something new, edit the YAML and recreate the env.

或者,您可以切换到 zbarlight 可通过Conda Forge获得,并且似乎保持不变.

Alternatively, you could switch to zbarlight, which is available through Conda Forge and appears to be consistently maintained.