Skip to content

cairo-2

error

OSError: no library called "cairo-2" was found

no library called "cairo" was found

no library called "libcairo-2" was found

cannot load library 'libcairo.so.2': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo.so.2'

cannot load library 'libcairo.2.dylib': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo.2.dylib'

cannot load library 'libcairo-2.dll': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo-2.dll'

  • windows

安装 GTK Runtime

  • Ubuntu
bash
sudo apt-get install libcairo2-dev
  • CentOS
bash
sudo yum install cairo-devel
  • macOS
bash
brew install cairo

libSM.so.6

error

ImportError: libSM.so.6: cannot open shared object file: No such file or directory

  • 安装 apt-file
bash
apt-get update
apt-get install apt-file
apt-file update
  • 寻找依赖库
bash
apt-file search libSM.so.6
  • 安装合适的依赖库
bash
apt-get install libsm6

python37.lib

VS2019 error

LINK : fatal error LNK1104: 无法打开文件“python37.lib”

在自己的 build 文件夹内新建一个名为 Directory.Build.props 的文件,指向自己 python37.lib 所在文件夹。

xml
<Project>
    <ItemDefinitionGroup>
      <Link>
        <AdditionalLibraryDirectories>C:\Program Files\Python37\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
      </Link>
    </ItemDefinitionGroup>
</Project>

cudart64_100.dll

error

Could not load dynamic library 'cudart64_100.dll';

dlerror: cudart64_100.dll not found

opencv_python-3.4.2.16

error

opencv_python-3.4.2.16-cp37-cp37m-manylinux1_i686.whl is not a supported wheel on this platform.

opencv_python-3.4.2.16-cp37-cp37m-manylinux1_i686.whl

改为 opencv_python-3.4.2.16-cp37-cp37m-manylinux1_x86_64.whl

bash
pip install opencv_python-3.4.2.16-cp37-cp37m-manylinux1_x86_64.whl

opencv

conda activate 报错

error

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'

bash
#bash、fish、tcsh···
conda init <SHELL_NAME>