unicorn icon indicating copy to clipboard operation
unicorn copied to clipboard

Error install pip unicorn in macbookpro m1

Open AzhariRamadhan opened this issue 2 years ago • 1 comments

Previously I tried to install pwntools using the pip command, but found the error cannot install unicorn

pip3 install unicorn Collecting unicorn Using cached unicorn-2.0.0.tar.gz (2.7 MB) Preparing metadata (setup.py) ... done Building wheels for collected packages: unicorn Building wheel for unicorn (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [4 lines of output] running bdist_wheel running build Building C extensions error: [Errno 2] No such file or directory: '/private/var/folders/9j/111tdfkx7551qxq5nzszpsym0000gn/T/pip-install-v5fudewc/unicorn_e42534da56974d79b619426bcce397fe/../../include/unicorn' [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for unicorn Running setup.py clean for unicorn Failed to build unicorn WARNING: Error parsing requirements for idna: [Errno 2] No such file or directory: '/opt/homebrew/lib/python3.10/site-packages/idna-3.3.dist-info/METADATA' Installing collected packages: unicorn Running setup.py install for unicorn ... error error: subprocess-exited-with-error

× Running setup.py install for unicorn did not run successfully. │ exit code: 1 ╰─> [6 lines of output] running install /opt/homebrew/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build Building C extensions error: [Errno 2] No such file or directory: '/private/var/folders/9j/111tdfkx7551qxq5nzszpsym0000gn/T/pip-install-v5fudewc/unicorn_e42534da56974d79b619426bcce397fe/../../include/unicorn' [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure

× Encountered error while trying to install package. ╰─> unicorn

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

AzhariRamadhan avatar Sep 16 '22 12:09 AzhariRamadhan

Duplicate of #1541

bet4it avatar Sep 16 '22 13:09 bet4it

Expected to be solved by #1654

wtdcode avatar Sep 25 '22 16:09 wtdcode

Confirmed solved by

pip3 install "git+https://github.com/unicorn-engine/unicorn@e76b2db434382f59661471faae02b022a3ee5a30#subdirectory=bindings/python/"

fuomag9 avatar Oct 08 '22 14:10 fuomag9

Confirmed solved by

pip3 install "git+https://github.com/unicorn-engine/unicorn@e76b2db434382f59661471faae02b022a3ee5a30#subdirectory=bindings/python/"

This is cool. I add it to our docs. Thanks!

wtdcode avatar Oct 08 '22 18:10 wtdcode

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.

github-actions[bot] avatar Dec 08 '22 05:12 github-actions[bot]

× Running setup.py install for unicorn did not run successfully. │ exit code: 1 ╰─> [3 lines of output] /opt/homebrew/Caskroom/miniforge/base/envs/fengrun/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( error: [Errno 2] No such file or directory: 'cmake' [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure

× Encountered error while trying to install package. ╰─> unicorn

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

i install raise error python 3.9.16

PalaChen avatar Mar 09 '23 08:03 PalaChen

Confirmed solved by

pip3 install "git+https://github.com/unicorn-engine/unicorn@e76b2db434382f59661471faae02b022a3ee5a30#subdirectory=bindings/python/"

The above installation is not working for me. I am using M2.

Output:

$ pip3 install "git+https://github.com/unicorn-engine/unicorn@e76b2db434382f59661471faae02b022a3ee5a30#subdirectory=bindings/python/"
Defaulting to user installation because normal site-packages is not writeable Collecting git+https://github.com/unicorn-engine/unicorn@e76b2db434382f59661471faae02b022a3ee5a30#subdirectory=bindings/python/ Cloning https://github.com/unicorn-engine/unicorn (to revision e76b2db434382f59661471faae02b022a3ee5a30) to /private/var/folders/1r/n72t95k10t93nydc0bggfg8w0000gn/T/pip-req-build-0r0g88du Running command git clone --filter=blob:none --quiet https://github.com/unicorn-engine/unicorn /private/var/folders/1r/n72t95k10t93nydc0bggfg8w0000gn/T/pip-req-build-0r0g88du Running command git rev-parse -q --verify 'sha^e76b2db434382f59661471faae02b022a3ee5a30' Running command git fetch -q https://github.com/unicorn-engine/unicorn e76b2db434382f59661471faae02b022a3ee5a30 Running command git checkout -q e76b2db434382f59661471faae02b022a3ee5a30 Resolved https://github.com/unicorn-engine/unicorn to commit e76b2db434382f59661471faae02b022a3ee5a30 Running command git submodule update --init --recursive -q Preparing metadata (setup.py) ... done Building wheels for collected packages: unicorn Building wheel for unicorn (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [1 lines of output] error: [Errno 2] No such file or directory: 'cmake' [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for unicorn Running setup.py clean for unicorn Failed to build unicorn Installing collected packages: unicorn Running setup.py install for unicorn ... error error: subprocess-exited-with-error

× Running setup.py install for unicorn did not run successfully. │ exit code: 1 ╰─> [3 lines of output] /Users/gilf0ile/Library/Python/3.9/lib/python/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( error: [Errno 2] No such file or directory: 'cmake' [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure

× Encountered error while trying to install package. ╰─> unicorn

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

gilf0ile avatar Apr 11 '23 11:04 gilf0ile

Have you cmake installed?

I don't know, if you can install cmake via a pip as a dependency, but I assume not.

PhilippTakacs avatar Apr 11 '23 11:04 PhilippTakacs

@gilf0ile pip told you that you need cmake to do so as you are building it by yourselves.

wtdcode avatar Apr 11 '23 13:04 wtdcode

Installing cmake fixed the issue. It was not on PATH actually. Thank You

gilf0ile avatar Apr 12 '23 18:04 gilf0ile

The solution if you want to install unicorn on a mac M2. $brew install cmake pkg-config $cmake .. -DCMAKE_BUILD_TYPE=Release $pip install unicorn --upgrade

louismartindunord avatar Sep 06 '23 08:09 louismartindunord

The solution if you want to install unicorn on a mac M2. $brew install cmake pkg-config $cmake .. -DCMAKE_BUILD_TYPE=Release $pip install unicorn --upgrade

It works for me! Thank you so much!!

Myohannn avatar Oct 17 '23 17:10 Myohannn

Add to our website with: https://github.com/unicorn-engine/unicorn-engine.github.io/pull/14

wtdcode avatar Oct 18 '23 07:10 wtdcode