Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip has no --install-option #1

Open
Puiching-Memory opened this issue Aug 16, 2023 · 4 comments
Open

pip has no --install-option #1

Puiching-Memory opened this issue Aug 16, 2023 · 4 comments

Comments

@Puiching-Memory
Copy link

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

@Puiching-Memory
Copy link
Author

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

@Puiching-Memory
Copy link
Author

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

@Puiching-Memory
Copy link
Author

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.

@kloppjp
Copy link
Owner

kloppjp commented Sep 7, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants