error: [Errno 2] No such file or directory
Closed this issue · 3 comments
MacOS with Apple M1
Defaulting to user installation because normal site-packages is not writeable
Collecting urlquote
Using cached urlquote-1.1.4.tar.gz (23 kB)
Requirement already satisfied: milksnake in /Library/Python/2.7/site-packages (from urlquote) (0.1.5)
Requirement already satisfied: cffi>=1.6.0 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from milksnake->urlquote) (1.14.3)
Requirement already satisfied: pycparser in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from cffi>=1.6.0->milksnake->urlquote) (2.19)
Building wheels for collected packages: urlquote
Building wheel for urlquote (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4x/hsb1hwln2y56rs0tljkwgq_m0000gn/T/pip-install-1zVxZn/urlquote/setup.py'"'"'; __file__='"'"'/private/var/folders/4x/hsb1hwln2y56rs0tljkwgq_m0000gn/T/pip-install-1zVxZn/urlquote/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/4x/hsb1hwln2y56rs0tljkwgq_m0000gn/T/pip-wheel-iNzy7_
cwd: /private/var/folders/4x/hsb1hwln2y56rs0tljkwgq_m0000gn/T/pip-install-1zVxZn/urlquote/
Complete output (10 lines):
running bdist_wheel
running build
running build_py
creating build/lib
creating build/lib/urlquote
copying urlquote/__init__.py -> build/lib/urlquote
copying urlquote/_native__ffi.py -> build/lib/urlquote
copying urlquote/_native.py -> build/lib/urlquote
copying urlquote/quoting.py -> build/lib/urlquote
error: [Errno 2] No such file or directory
----------------------------------------
ERROR: Failed building wheel for urlquote
Running setup.py clean for urlquote
Failed to build urlquote
Installing collected packages: urlquote
Running setup.py install for urlquote ... error
ERROR: Command errored out with exit status 1:
command: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4x/hsb1hwln2y56rs0tljkwgq_m0000gn/T/pip-install-1zVxZn/urlquote/setup.py'"'"'; __file__='"'"'/private/var/folders/4x/hsb1hwln2y56rs0tljkwgq_m0000gn/T/pip-install-1zVxZn/urlquote/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/4x/hsb1hwln2y56rs0tljkwgq_m0000gn/T/pip-record-cDWp0R/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/user/Library/Python/2.7/include/python2.7/urlquote
cwd: /private/var/folders/4x/hsb1hwln2y56rs0tljkwgq_m0000gn/T/pip-install-1zVxZn/urlquote/
Complete output (10 lines):
running install
running build
running build_py
creating build/lib
creating build/lib/urlquote
copying urlquote/__init__.py -> build/lib/urlquote
copying urlquote/_native__ffi.py -> build/lib/urlquote
copying urlquote/_native.py -> build/lib/urlquote
copying urlquote/quoting.py -> build/lib/urlquote
error: [Errno 2] No such file or directory
----------------------------------------
ERROR: Command errored out with exit status 1: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4x/hsb1hwln2y56rs0tljkwgq_m0000gn/T/pip-install-1zVxZn/urlquote/setup.py'"'"'; __file__='"'"'/private/var/folders/4x/hsb1hwln2y56rs0tljkwgq_m0000gn/T/pip-install-1zVxZn/urlquote/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/4x/hsb1hwln2y56rs0tljkwgq_m0000gn/T/pip-record-cDWp0R/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/user/Library/Python/2.7/include/python2.7/urlquote Check the logs for full command output.
Hello @ShahrearBinAmin ,
you are treating a bit on unchartered terretory here, because then urlquote had been created, the Apple M1 platform did not exist yet.
The good news: The rust percent encoding crate builds just fine, and a C-Interface is used to interface with the Python code, so there is no problem which would prevent this to work in principle.
I really want to help you building this, but sadly I do lack access to an M1 myself. I would rely on you or another Apple M1 user to provide further diagnostics.
Could you checkout the repository and follow the steps in the readme to build it yourself. Could you find out which file the build process does not find?
Just to be sure it is not something silly: You do have a Rust toolchain installed locally?
Cheers, Markus
We are building urlquote just fine on M1 on conda-forge. Personally, I have been using it since 10 months there. I think the issue here could also be that it is installed using Python 2.7 (this is probably in Rosetta ?)
@pacman82 Rust wasn't installed. It's working fine after installing Rust. Thanks. 😃