K0lb3 / UnityPy

UnityPy is python module that makes it possible to extract/unpack and edit Unity assets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"pip install UnityPy" fail

winthropchang opened this issue · comments

commented

I already install Python 3.11.0 on my MacbookPro.
When I use command "pip install UnityPy" write in README.md file.
I always get errors.

Collecting UnityPy
  Using cached unitypy-1.9.20.tar.gz (7.7 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [113 lines of output]
      Using fmod lib: UnityPy/lib/FMOD/Darwin/x64/libfmod.dylib
      Building UnityPyBoost
      running build_ext
      building 'UnityPy.UnityPyBoost' extension
      creating build
      creating build/temp.macosx-10.9-universal2-3.11
      creating build/temp.macosx-10.9-universal2-3.11/UnityPyBoost
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/private/var/folders/jk/fbt1t94x4hb4k24jky29gr7c0000gn/T/pip-install-r4nqa0lw/unitypy_0971f0de9e464090be29f5229df50a24/UnityPyBoost -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c UnityPyBoost/AnimationClip.c -o build/temp.macosx-10.9-universal2-3.11/UnityPyBoost/AnimationClip.o
      In file included from UnityPyBoost/AnimationClip.c:1:
      In file included from /private/var/folders/jk/fbt1t94x4hb4k24jky29gr7c0000gn/T/pip-install-r4nqa0lw/unitypy_0971f0de9e464090be29f5229df50a24/UnityPyBoost/AnimationClip.h:3:
      In file included from /Library/Frameworks/Python.framework/Versions/3.11/include/python3.11/Python.h:23:
      In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:62:
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
      #error Unsupported architecture
       ^
      In file included from UnityPyBoost/AnimationClip.c:1:
      In file included from /private/var/folders/jk/fbt1t94x4hb4k24jky29gr7c0000gn/T/pip-install-r4nqa0lw/unitypy_0971f0de9e464090be29f5229df50a24/UnityPyBoost/AnimationClip.h:3:
      In file included from /Library/Frameworks/Python.framework/Versions/3.11/include/python3.11/Python.h:23:
      In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:64:
      In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:27:
      In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:33:
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
      #error architecture not supported
       ^
      In file included from UnityPyBoost/AnimationClip.c:1:
      In file included from /private/var/folders/jk/fbt1t94x4hb4k24jky29gr7c0000gn/T/pip-install-r4nqa0lw/unitypy_0971f0de9e464090be29f5229df50a24/UnityPyBoost/AnimationClip.h:3:
      In file included from /Library/Frameworks/Python.framework/Versions/3.11/include/python3.11/Python.h:23:
      In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:64:
      In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:27:
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'; did you mean '__int128_t'?
      typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
              ^
      note: '__int128_t' declared here
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
      typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
              ^
      note: '__int128_t' declared here
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
      typedef __int32_t       __darwin_dev_t;         /* dev_t */
              ^
      note: '__int128_t' declared here
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
      typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
              ^
      note: '__uint128_t' declared here
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
      typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
              ^
      note: '__uint128_t' declared here
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'; did you mean '__uint128_t'?
      typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
              ^
      note: '__uint128_t' declared here
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
      typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
              ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'; did you mean '__uint128_t'?
      typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
              ^
      note: '__uint128_t' declared here
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'; did you mean '__int128_t'?
      typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
              ^
      note: '__int128_t' declared here
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
      typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
              ^
      note: '__int128_t' declared here
      /Library/Developer/CommandLineTools/SDKs/MacOSX.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/MacOSX.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/MacOSX.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/MacOSX.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 UnityPyBoost/AnimationClip.c:1:
      In file included from /private/var/folders/jk/fbt1t94x4hb4k24jky29gr7c0000gn/T/pip-install-r4nqa0lw/unitypy_0971f0de9e464090be29f5229df50a24/UnityPyBoost/AnimationClip.h:3:
      In file included from /Library/Frameworks/Python.framework/Versions/3.11/include/python3.11/Python.h:23:
      In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:64:
      /Library/Developer/CommandLineTools/SDKs/MacOSX.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 UnityPyBoost/AnimationClip.c:1:
      In file included from /private/var/folders/jk/fbt1t94x4hb4k24jky29gr7c0000gn/T/pip-install-r4nqa0lw/unitypy_0971f0de9e464090be29f5229df50a24/UnityPyBoost/AnimationClip.h:3:
      In file included from /Library/Frameworks/Python.framework/Versions/3.11/include/python3.11/Python.h:23:
      In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:66:
      In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h:109:
      In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h:82:
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h:34:2: error: architecture not supported
      #error architecture not supported
       ^
      In file included from UnityPyBoost/AnimationClip.c:1:
      In file included from /private/var/folders/jk/fbt1t94x4hb4k24jky29gr7c0000gn/T/pip-install-r4nqa0lw/unitypy_0971f0de9e464090be29f5229df50a24/UnityPyBoost/AnimationClip.h:3:
      In file included from /Library/Frameworks/Python.framework/Versions/3.11/include/python3.11/Python.h:23:
      In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:66:
      In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h:109:
      In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h:146:
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h:31:2: error: architecture not supported
      #error architecture not supported
       ^
      fatal error: too many errors emitted, stopping now [-ferror-limit=]
      20 errors generated.
      error: command '/usr/local/opt/llvm/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.

How to fix those error and install UnityPy sucessfully?
Thanks

Can you try installing the wheel from the artifacts in this run? https://github.com/squaresmile/UnityPy/actions/runs/3540797884

macos_arm64 and macos_universal2 wheels were uploaded to PyPI. Can you try installing again?