kloppjp/pyde265

pip has no --install-option

Opened this issue · 4 comments

PS C:\Users\11386\Downloads\pyde265-master\pyde265-master> pip install . --install-option="--libde265_path=/path_to_libde265/build/libde265"

Usage:
pip install [options] [package-index-options] ...
pip install [options] -r [package-index-options] ...
pip install [options] [-e] ...
pip install [options] [-e] ...
pip install [options] <archive url/path> ...

no such option: --install-option
——————————————

pip :23.2.1

I noticed an error on line 32 in setup.py
os.environ.get('LD_LIBRARY_PATH').split(':')
It may not find the target path, and it is possible to return None

PS C:\Users\11386\Desktop\pyde265-master\pyde265-master> pip install .
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing c:\users\11386\desktop\pyde265-master\pyde265-master
Preparing metadata (setup.py) ... done
Building wheels for collected packages: PyDe265
Building wheel for PyDe265 (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [38 lines of output]
['C:\Users\11386\Desktop\pyde265-master\pyde265-master\libde265']
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\pyde265
copying pyde265\code_structure.py -> build\lib.win-amd64-cpython-39\pyde265
copying pyde265\de265_enums.py -> build\lib.win-amd64-cpython-39\pyde265
copying pyde265_init_.py -> build\lib.win-amd64-cpython-39\pyde265
running build_ext
building 'pyde265.image' extension
creating build\temp.win-amd64-cpython-39
creating build\temp.win-amd64-cpython-39\Release
creating build\temp.win-amd64-cpython-39\Release\pyde265
"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Iinclude -ID:\Python\Python3.9\lib\site-packages\numpy\core\include -ID:\Python\Python3.9\include -ID:\Python\Python3.9\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcpyde265/image.c /Fobuild\temp.win-amd64-cpython-39\Release\pyde265/image.obj
image.c
D:\Python\Python3.9\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
pyde265/image.c(1516): warning C4005: “__pyx_nonatomic_int_type”: 宏重定义
pyde265/image.c(1467): note: 参见“__pyx_nonatomic_int_type”的前一个定义
pyde265/image.c(19272): warning C4090: “=”: 不同的“const”限定符
pyde265/image.c(21576): warning C4090: “=”: 不同的“const”限定符
pyde265/image.c(21601): warning C4090: “=”: 不同的“const”限定符
"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\11386\Desktop\pyde265-master\pyde265-master\libde265 /LIBPATH:D:\Python\Python3.9\libs /LIBPATH:D:\Python\Python3.9 /LIBPATH:D:\Python\Python3.9\PCbuild\amd64 "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x64" de265.lib /EXPORT:PyInit_image build\temp.win-amd64-cpython-39\Release\pyde265/image.obj /OUT:build\lib.win-amd64-cpython-39\pyde265\image.cp39-win_amd64.pyd /IMPLIB:build\temp.win-amd64-cpython-39\Release\pyde265\image.cp39-win_amd64.lib
正在创建库 build\temp.win-amd64-cpython-39\Release\pyde265\image.cp39-win_amd64.lib 和对象 build\temp.win-amd64-cpython-39\Release\pyde265\image.cp39-win_amd64.exp
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_intraDir_info
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_TUInfo_info
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_CTB_Info_Layout
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_PB_info
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_TUInfo_Info_layout
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_image_plane
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_CTB_sliceIdx
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_CB_info
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_PB_Info_layout
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_CB_Info_Layout
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_IntraDir_Info_layout
build\lib.win-amd64-cpython-39\pyde265\image.cp39-win_amd64.pyd : fatal error LNK1120: 11 个无法解析的外部命令
error: command 'C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\link.exe' failed with exit code 1120
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for PyDe265
Running setup.py clean for PyDe265
Failed to build PyDe265
ERROR: Could not build wheels for PyDe265, which is required to install pyproject.toml-based projects
PS C:\Users\11386\Desktop\pyde265-master\pyde265-master> pip install .
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing c:\users\11386\desktop\pyde265-master\pyde265-master
Preparing metadata (setup.py) ... done
Building wheels for collected packages: PyDe265
Building wheel for PyDe265 (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [38 lines of output]
['C:\Users\11386\Desktop\pyde265-master\pyde265-master\libde265']
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\pyde265
copying pyde265\code_structure.py -> build\lib.win-amd64-cpython-39\pyde265
copying pyde265\de265_enums.py -> build\lib.win-amd64-cpython-39\pyde265
copying pyde265_init_.py -> build\lib.win-amd64-cpython-39\pyde265
running build_ext
building 'pyde265.image' extension
creating build\temp.win-amd64-cpython-39
creating build\temp.win-amd64-cpython-39\Release
creating build\temp.win-amd64-cpython-39\Release\pyde265
"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Iinclude -ID:\Python\Python3.9\lib\site-packages\numpy\core\include -ID:\Python\Python3.9\include -ID:\Python\Python3.9\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcpyde265/image.c /Fobuild\temp.win-amd64-cpython-39\Release\pyde265/image.obj
image.c
D:\Python\Python3.9\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
pyde265/image.c(1516): warning C4005: “__pyx_nonatomic_int_type”: 宏重定义
pyde265/image.c(1467): note: 参见“__pyx_nonatomic_int_type”的前一个定义
pyde265/image.c(19272): warning C4090: “=”: 不同的“const”限定符
pyde265/image.c(21576): warning C4090: “=”: 不同的“const”限定符
pyde265/image.c(21601): warning C4090: “=”: 不同的“const”限定符
"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\11386\Desktop\pyde265-master\pyde265-master\libde265 /LIBPATH:D:\Python\Python3.9\libs /LIBPATH:D:\Python\Python3.9 /LIBPATH:D:\Python\Python3.9\PCbuild\amd64 "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x64" de265.lib /EXPORT:PyInit_image build\temp.win-amd64-cpython-39\Release\pyde265/image.obj /OUT:build\lib.win-amd64-cpython-39\pyde265\image.cp39-win_amd64.pyd /IMPLIB:build\temp.win-amd64-cpython-39\Release\pyde265\image.cp39-win_amd64.lib
正在创建库 build\temp.win-amd64-cpython-39\Release\pyde265\image.cp39-win_amd64.lib 和对象 build\temp.win-amd64-cpython-39\Release\pyde265\image.cp39-win_amd64.exp
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_intraDir_info
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_TUInfo_info
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_CTB_Info_Layout
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_PB_info
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_TUInfo_Info_layout
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_image_plane
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_CTB_sliceIdx
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_CB_info
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_PB_Info_layout
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_CB_Info_Layout
image.obj : error LNK2001: 无法解析的外部符号 __imp_de265_internals_get_IntraDir_Info_layout
build\lib.win-amd64-cpython-39\pyde265\image.cp39-win_amd64.pyd : fatal error LNK1120: 11 个无法解析的外部命令
error: command 'C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\link.exe' failed with exit code 1120
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for PyDe265
Running setup.py clean for PyDe265
Failed to build PyDe265
ERROR: Could not build wheels for PyDe265, which is required to install pyproject.toml-based projects

I modified the code for setup.py and now it completes the process of compiling cython into c files. But an error occurred while building the wheel. My guess is that there is a problem with the c file generation, which may be traced back to the original pyx file.

@Puiching-Memory Thank you for the information. From your error pasted above, it looks like you are using Windows. I do not know if libde265 supports Windows, but this package certainly does not. If you have any specific questions or need help porting it to Windows, feel free to let me know.

Regarding the --install-option argument to pip, this has indeed been changed in version 23, I will update this.