Visual Studio 下载accimage库时出现问题

d6kp6zgx  于 2022-11-17  发布在  其他
关注(0)|答案(1)|浏览(256)

我下载accimage时遇到问题
当我在Powershell中运行以下载accimage时,出现了一个错误。

PS E:\Working and Learning\biancheng\cnnimageretrieval-pytorch-master\accimage-master> python setup.py build
running build
running build_ext
building 'accimage' extension
F:\App\VS\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:/jpeg-turbo64/include -IC:/Users/KAI/opt/intel/ipp/include -IE:\Anaconda\include -IE:\Anaconda\include -IF:\App\VS\VC\Tools\MSVC\14.33.31629\include -IF:\App\VS\VC\Tools\MSVC\14.33.31629\ATLMFC\include -IF:\App\VS\VC\Auxiliary\VS\include "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcaccimagemodule.c /Fobuild\temp.win-amd64-3.8\Release\accimagemodule.obj
accimagemodule.c
F:\App\VS\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:/jpeg-turbo64/include -IC:/Users/KAI/opt/intel/ipp/include -IE:\Anaconda\include -IE:\Anaconda\include -IF:\App\VS\VC\Tools\MSVC\14.33.31629\include -IF:\App\VS\VC\Tools\MSVC\14.33.31629\ATLMFC\include -IF:\App\VS\VC\Auxiliary\VS\include "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcjpegloader.c /Fobuild\temp.win-amd64-3.8\Release\jpegloader.obj
jpegloader.c
jpegloader.c(5): fatal error C1083: 无法打开包括文件: “jpeglib.h”: No such file or directory
error: command 'F:\\App\\VS\\VC\\Tools\\MSVC\\14.33.31629\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
PS E:\Working and Learning\biancheng\cnnimageretrieval-pytorch-master\accimage-master>

包含“jpeglib.h”的路径
“setup.py“

from distutils.core import setup, Extension

accimage = Extension(
    "accimage",
    include_dirs=["C:/jpeg-turbo64/include", "C:/Users/KAI/opt/intel/ipp/include"],
    libraries=["jpeg", "ippi", "ipps"],
    library_dirs=["C:/jpeg-turbo-gcc64/lib", "C:/Users/KAI/opt/intel/ipp/Lib"],
    sources=["accimagemodule.c", "jpegloader.c", "imageops.c"],
)

setup(
    name="accimage",
    version="0.2.0",
    description="Accelerated image loader and preprocessor for Torch",
    author="Marat Dukhan",
    author_email="maratek@gmail.com",
    ext_modules=[accimage],
)

我试过一些解决办法,但是没有用。我不知道为什么会这样。

jv4diomz

jv4diomz1#

在下载accimage之前,您需要先下载ipp(Intel Integrated Performance Primitives)和jepg-turbo。您需要注意为您的编译器下载相应的jpeg-turbo。下载完之后,请确保这两个库在“www.example.com“中的路径setup.py正确。这样您就可以成功运行它。

相关问题