PeterDing / BaiduPCS-Py

BaiduPCS API & App 百度网盘客户端 和 API
MIT License
698 stars 113 forks source link

why mac compile failed #36

Closed Wbqqqq closed 3 years ago

Wbqqqq commented 3 years ago

note: 'int128_t' declared here /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:73:9: error: unknown type name 'uint32_t'; did you mean 'uint128_t'? typedef __uint32_t darwin_sigset_t; / [???] signal set / ^ note: 'uint128_t' declared here /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:74:9: error: unknown type name 'int32_t'; did you mean 'int128_t'? typedef __int32_t darwin_suseconds_t; / [???] microseconds / ^ note: 'int128_t' declared here /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:75:9: error: unknown type name 'uint32_t'; did you mean 'uint128_t'? typedef __uint32_t darwin_uid_t; / [???] user IDs / ^ note: 'uint128_t' declared here /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:76:9: error: unknown type name 'uint32_t'; did you mean 'uint128_t'? typedef __uint32_t darwin_useconds_t; / [???] microseconds / ^ note: 'uint128_t' declared here In file included from baidupcs_py/common/simple_cipher.c:18: In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:71: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'; did you mean 'uint128_t'? typedef __uint32_t darwin_wctype_t; ^ note: 'uint128_t' declared here In file included from baidupcs_py/common/simple_cipher.c:18: In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:75: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_va_list.h:31: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/types.h:37:2: error: architecture not supported

error architecture not supported

^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. error: command 'clang' failed with exit status 1 Traceback (most recent call last): File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in main() File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 140, in build_wheel return _build_backend().build_wheel(wheel_directory, configsettings, File "/private/var/folders/f/lx6ypd316dz0kzm313_gll1m0000gp/T/pip-build-env-41eu44xb/overlay/lib/python3.8/site-packages/poetry/core/masonry/api.py", line 68, in build_wheel return unicode(WheelBuilder.make_in(poetry, Path(wheeldirectory))) File "/private/var/folders/f/lx6ypd316dz0kzm313_gll1m0000gp/T/pip-build-env-41eu44xb/overlay/lib/python3.8/site-packages/poetry/core/masonry/builders/wheel.py", line 72, in makein wb.build() File "/private/var/folders/f/lx6ypd316dz0kzm313_gll1m0000gp/T/pip-build-env-41eu44xb/overlay/lib/python3.8/site-packages/poetry/core/masonry/builders/wheel.py", line 103, in build self._build(zipfile) File "/private/var/folders/f/lx6ypd316dz0kzm313_gll1m0000gp/T/pip-build-env-41eu44xb/overlay/lib/python3.8/site-packages/poetry/core/masonry/builders/wheel.py", line 135, in _build self._run_buildcommand(setup) File "/private/var/folders/f/lx6ypd316dz0kzm313_gll1m0000gp/T/pip-build-env-41eu44xb/overlay/lib/python3.8/site-packages/poetry/core/masonry/builders/wheel.py", line 163, in _run_build_command subprocess.check_call( File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 364, in checkcall raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/Applications/Xcode.app/Contents/Developer/usr/bin/python3', '/private/var/folders/f/lx6ypd316dz0kzm313gll1m0000gp/T/pip-install-36kjqky5/BaiduPCS-Py/setup.py', 'build', '-b', '/private/var/folders/f/lx6ypd316dz0kzm313_gll1m0000gp/T/pip-install-36kjqky5/BaiduPCS-Py/build']' returned non-zero exit status 1.

ERROR: Failed building wheel for BaiduPCS-Py Running setup.py clean for BaiduPCS-Py Failed to build BaiduPCS-Py Building wheels for collected packages: aget, mugen Building wheel for aget (setup.py) ... done Created wheel for aget: filename=aget-0.1.17-cp38-none-any.whl size=9379 sha256=353e3318496a52f508ceb1c82c7f12c975c040ae9a28368d6f04b1547edcd5eb Stored in directory: /Users/wangbingquan/Library/Caches/pip/wheels/fd/c4/7f/833a8a4dc042055d182d84010df7f7ae270191ff1e490fcdbd Building wheel for mugen (setup.py) ... done Created wheel for mugen: filename=mugen-0.4.4-cp38-none-any.whl size=17426 sha256=a165194ce487380d3703b34789aabd22ae786c2fac9903d23ec470a82c7cf4d7 Stored in directory: /Users/wangbingquan/Library/Caches/pip/wheels/f0/48/db/51480b9b463c782997e781d130edb1fa8993d4be0b0d4eb575 Successfully built aget mugen ERROR: Could not build wheels for BaiduPCS-Py which use PEP 517 and cannot be installed directly

PeterDing commented 3 years ago

试试先 pip3 install cython 然后再 pip3 install BaiduPCS-Py

Wbqqqq commented 3 years ago

Done!Thanks