kivy-ios: install grpc ==> FileNotFoundError: [Errno 2] No such file or directory: '/bin/false
See original GitHub issueI am trying to install grpcio for kivy-ios on macos, but I am receiving the error “FileNotFoundError: [Errno 2] No such file or directory: ‘/bin/false’”
false does not exist in the /bin directory, but in /usr/bin directory. I do not know how to make the command look at this directory instead (check the “running shell” line in the log below and you will see: _env: {‘CC’: ‘/bin/false’, ‘CXX’: ‘/bin/false’
I have tried many changes, but I am still getting similar errors.
Can you please assist me.
the command run is:
toolchain pip install grpcio
[INFO ] Include dir added: {arch.arch}/freetype
[INFO ] Include dir added: {arch.arch}/hostlibffi
[INFO ] Global: hostpython located at /Users/user/Desktop/app_android/dist/hostpython3/bin/python
[INFO ] Global: hostpgen located at /Users/user/Desktop/app_android/dist/hostpython3/bin/pgen
[INFO ] Include dir added: {arch.arch}/ffi
[INFO ] Include dir added: {arch.arch}/openssl
[INFO ] Include dir added: common/sdl2
[INFO ] Include dir added: common/sdl2_image
[INFO ] Include dir added: common/sdl2_mixer
[INFO ] Include dir added: common/sdl2_ttf
[ERROR ] Executing pip with: ['install', '--isolated', '--prefix', '/Users/user/Desktop/app_android/dist/root/python3', 'grpcio']
[INFO ] Running Shell: /Users/user/Desktop/app_android/dist/hostpython3/bin/pip3 ('install', '--isolated', '--prefix', '/Users/user/Desktop/app_android/dist/root/python3', 'grpcio') {'_env': {'CC': '/bin/false', 'CXX': '/bin/false', 'PYTHONPATH': '/Users/user/Desktop/app_android/dist/root/python3/lib/python3.8/site-packages', 'PYTHONOPTIMIZE': '2'}, '_iter': True, '_out_bufsize': 1, '_err_to_out': True}
[DEBUG ] Collecting grpcio
[DEBUG ] Using cached https://files.pythonhosted.org/packages/07/ea/398472e896f529d23fb58e33f01298dfc554a341d58f87c1ea5ad817208e/grpcio-1.39.0.tar.gz
[DEBUG ] ERROR: Command errored out with exit status 1:
[DEBUG ] command: /Users/user/Desktop/app_android/dist/hostpython3/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-dlln9pfd/grpcio/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-dlln9pfd/grpcio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' --no-user-cfg egg_info --egg-base pip-egg-info
[DEBUG ] cwd: /private/tmp/pip-install-dlln9pfd/grpcio/
[DEBUG ] Complete output (11 lines):
[DEBUG ] Traceback (most recent call last):
[DEBUG ] File "<string>", line 1, in <module>
[DEBUG ] File "/private/tmp/pip-install-dlln9pfd/grpcio/setup.py", line 257, in <module>
[DEBUG ] if check_linker_need_libatomic():
[DEBUG ] File "/private/tmp/pip-install-dlln9pfd/grpcio/setup.py", line 204, in check_linker_need_libatomic
[DEBUG ] cpp_test = subprocess.Popen([cxx, '-x', 'c++', '-std=c++11', '-'],
[DEBUG ] File "/Users/user/Desktop/app_android/dist/hostpython3/lib/python3.8/subprocess.py", line 854, in __init__
[DEBUG ] self._execute_child(args, executable, preexec_fn, close_fds,
[DEBUG ] File "/Users/user/Desktop/app_android/dist/hostpython3/lib/python3.8/subprocess.py", line 1702, in _execute_child
[DEBUG ] raise child_exception_type(errno_num, err_msg, err_filename)
[DEBUG ] FileNotFoundError: [Errno 2] No such file or directory: '/bin/false'
[DEBUG ] ----------------------------------------
[DEBUG ] ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
[DEBUG ] WARNING: You are using pip version 19.2.3, however version 21.2.3 is available.
[DEBUG ] You should consider upgrading via the 'pip install --upgrade pip' command.
Exception in thread background thread for pid 14027:
Traceback (most recent call last):
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/Users/user/Desktop/app_android/venv/lib/python3.8/site-packages/sh.py", line 1683, in wrap
fn(*rgs, **kwargs)
File "/Users/user/Desktop/app_android/venv/lib/python3.8/site-packages/sh.py", line 2662, in background_thread
handle_exit_code(exit_code)
File "/Users/user/Desktop/app_android/venv/lib/python3.8/site-packages/sh.py", line 2349, in fn
return self.command.handle_command_exit_code(exit_code)
File "/Users/user/Desktop/app_android/venv/lib/python3.8/site-packages/sh.py", line 905, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /Users/user/Desktop/app_android/dist/hostpython3/bin/pip3 install --isolated --prefix /Users/user/Desktop/app_android/dist/root/python3 grpcio
STDOUT:
Collecting grpcio
Using cached https://files.pythonhosted.org/packages/07/ea/398472e896f529d23fb58e33f01298dfc554a341d58f87c1ea5ad817208e/grpcio-1.39.0.tar.gz
ERROR: Command errored out with exit status 1:
command: /Users/user/Desktop/app_android/dist/hostpython3/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-dlln9pfd/grpcio/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-dlln9pfd/grpcio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' --no-user-cfg egg_info --egg-base pip-egg-info
cwd: /private/tmp/pip-install-dlln9pfd/grpcio/
Comple... (1190 more, please see e.stdout)
STDERR:
Traceback (most recent call last):
File "/Users/user/Desktop/app_android/venv/bin/toolchain", line 8, in <module>
sys.exit(main())
File "/Users/user/Desktop/app_android/venv/lib/python3.8/site-packages/kivy_ios/toolchain.py", line 1519, in main
ToolchainCL()
File "/Users/user/Desktop/app_android/venv/lib/python3.8/site-packages/kivy_ios/toolchain.py", line 1276, in __init__
getattr(self, args.command)()
File "/Users/user/Desktop/app_android/venv/lib/python3.8/site-packages/kivy_ios/toolchain.py", line 1478, in pip
_pip(sys.argv[2:])
File "/Users/user/Desktop/app_android/venv/lib/python3.8/site-packages/kivy_ios/toolchain.py", line 1171, in _pip
shprint(pip_cmd, *args, _env=pip_env)
File "/Users/user/Desktop/app_android/venv/lib/python3.8/site-packages/kivy_ios/toolchain.py", line 55, in shprint
for line in cmd:
File "/Users/user/Desktop/app_android/venv/lib/python3.8/site-packages/sh.py", line 953, in next
self.wait()
File "/Users/user/Desktop/app_android/venv/lib/python3.8/site-packages/sh.py", line 879, in wait
self.handle_command_exit_code(exit_code)
File "/Users/user/Desktop/app_android/venv/lib/python3.8/site-packages/sh.py", line 905, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /Users/user/Desktop/app_android/dist/hostpython3/bin/pip3 install --isolated --prefix /Users/user/Desktop/app_android/dist/root/python3 grpcio
STDOUT:
Collecting grpcio
Using cached https://files.pythonhosted.org/packages/07/ea/398472e896f529d23fb58e33f01298dfc554a341d58f87c1ea5ad817208e/grpcio-1.39.0.tar.gz
ERROR: Command errored out with exit status 1:
command: /Users/user/Desktop/app_android/dist/hostpython3/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-dlln9pfd/grpcio/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-dlln9pfd/grpcio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' --no-user-cfg egg_info --egg-base pip-egg-info
cwd: /private/tmp/pip-install-dlln9pfd/grpcio/
Comple... (1190 more, please see e.stdout)
STDERR:
THANKS!!!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
kivy-ios: install grpc ==> FileNotFoundError: [Errno 2] No such ...
The False file is in usr/bin/False on MacOs, I modified the CC and CXX path in kivy-ios/toolchain.py, and it solved this.
Read more >pip install fails with "No such file or directory: 'c++' - GitHub
FileNotFoundError : [Errno 2] No such file or directory: 'c++': 'c++'. See TROUBLESHOOTING.md for how to diagnose problems better.
Read more >[errno 2] no such file or directory: '/usr/bin/pip' - You.com | The ...
Misspelled file name. Invalid file path or directory path. Using a relative path. Solution to FileNotFoundError: [Errno 2] No such file or directory....
Read more >README.rst - Google Git
Package for gRPC Python. ... gRPC Python is available for Linux, macOS, and Windows. Installing From ... fatal error: Python.h: No such file...
Read more >Bountysource
kivy-ios : install grpc ==> FileNotFoundError: [Errno 2] No such file or directory: '/bin/false.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@AndreMiras I restarted my computer, and it finally allowed me to modify the toolchain.py. This error has been fixed, but I am having another error so I will open another issue. Thanks for your time and the help @AndreMiras.
Thanks for assisting me @AndreMiras, It does not allow me to modify venv/lib/python3.8/site-packages/kivy_ios/toolchain.py.