Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Doesn't install on wsl2 #149

Open
ttforsd opened this issue Aug 16, 2023 · 1 comment
Open

bug: Doesn't install on wsl2 #149

ttforsd opened this issue Aug 16, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@ttforsd
Copy link

ttforsd commented Aug 16, 2023

Describe the bug

pip install git+https://github.com/aarnphm/whispercpp.git leads to errors and doesn't install

`
ERROR: An error occurred during the fetch of repository 'local_config_python':
Traceback (most recent call last):
File "/home/tt/.cache/bazel/_bazel_tt/eef295a781ab947c7038b674b37d49c9/external/pybind11_bazel/python_configure.bzl", line 409, column 36, in _python_autoconf_impl
_create_local_python_repository(repository_ctx)
File "/home/tt/.cache/bazel/_bazel_tt/eef295a781ab947c7038b674b37d49c9/external/pybind11_bazel/python_configure.bzl", line 355, column 33, in _create_local_python_repository
python_bin = _get_python_bin(repository_ctx)
File "/home/tt/.cache/bazel/_bazel_tt/eef295a781ab947c7038b674b37d49c9/external/pybind11_bazel/python_configure.bzl", line 173, column 10, in _get_python_bin
_fail("Cannot find python in PATH, please make sure " +
File "/home/tt/.cache/bazel/_bazel_tt/eef295a781ab947c7038b674b37d49c9/external/pybind11_bazel/python_configure.bzl", line 27, column 9, in _fail
fail("%sPython Configuration Error:%s %s\n" % (red, no_color, msg))
Error in fail: Python Configuration Error: Cannot find python in PATH, please make sure python is installed and add its directory in PATH, or --repo_env PYTHON_BIN_PATH='/something/else'.
PATH=/tmp/pip-build-env-5d2xcjbc/overlay/local/bin:/tmp/pip-build-env-5d2xcjbc/normal/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.2/bin:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.2/libnvvp:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files/Intel/WiFi/bin/:/mnt/c/Program Files/Common Files/Intel/WirelessCommon/:/mnt/c/Program Files/Git/cmd:/mnt/c/msys64/mingw64/bin:/mnt/c/msys64/usr/bin:/mnt/c/Program Files/ffmpeg:/mnt/c/Program Files/NVIDIA Corporation/Nsight Compute 2023.2.0/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Users/yinch/AppData/Local/Programs/Python/Python311/Scripts/:/mnt/c/Users/yinch/AppData/Local/Programs/Python/Python311/:/mnt/c/Users/yinch/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/yinch/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin
ERROR: /tmp/pip-req-build-nk8q05cy/WORKSPACE:89:17: fetching python_configure rule //external:local_config_python: Traceback (most recent call last):
File "/home/tt/.cache/bazel/_bazel_tt/eef295a781ab947c7038b674b37d49c9/external/pybind11_bazel/python_configure.bzl", line 409, column 36, in _python_autoconf_impl
_create_local_python_repository(repository_ctx)
File "/home/tt/.cache/bazel/_bazel_tt/eef295a781ab947c7038b674b37d49c9/external/pybind11_bazel/python_configure.bzl", line 355, column 33, in _create_local_python_repository
python_bin = _get_python_bin(repository_ctx)
File "/home/tt/.cache/bazel/_bazel_tt/eef295a781ab947c7038b674b37d49c9/external/pybind11_bazel/python_configure.bzl", line 173, column 10, in _get_python_bin
_fail("Cannot find python in PATH, please make sure " +
File "/home/tt/.cache/bazel/_bazel_tt/eef295a781ab947c7038b674b37d49c9/external/pybind11_bazel/python_configure.bzl", line 27, column 9, in _fail
fail("%sPython Configuration Error:%s %s\n" % (red, no_color, msg))
Error in fail: Python Configuration Error: Cannot find python in PATH, please make sure python is installed and add its directory in PATH, or --repo_env PYTHON_BIN_PATH='/something/else'.
PATH=/tmp/pip-build-env-5d2xcjbc/overlay/local/bin:/tmp/pip-build-env-5d2xcjbc/normal/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.2/bin:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.2/libnvvp:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files/Intel/WiFi/bin/:/mnt/c/Program Files/Common Files/Intel/WirelessCommon/:/mnt/c/Program Files/Git/cmd:/mnt/c/msys64/mingw64/bin:/mnt/c/msys64/usr/bin:/mnt/c/Program Files/ffmpeg:/mnt/c/Program Files/NVIDIA Corporation/Nsight Compute 2023.2.0/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Users/yinch/AppData/Local/Programs/Python/Python311/Scripts/:/mnt/c/Users/yinch/AppData/Local/Programs/Python/Python311/:/mnt/c/Users/yinch/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/yinch/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin
ERROR: /tmp/pip-req-build-nk8q05cy/BUILD.bazel:116:17: //:audio_cpp2py_export.so depends on @local_config_python//:python_headers in repository @local_config_python which failed to fetch. no such package '@local_config_python//': Python Configuration Error: Cannot find python in PATH, please make sure python is installed and add its directory in PATH, or --repo_env PYTHON_BIN_PATH='/something/else'.
PATH=/tmp/pip-build-env-5d2xcjbc/overlay/local/bin:/tmp/pip-build-env-5d2xcjbc/normal/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.2/bin:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.2/libnvvp:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files/Intel/WiFi/bin/:/mnt/c/Program Files/Common Files/Intel/WirelessCommon/:/mnt/c/Program Files/Git/cmd:/mnt/c/msys64/mingw64/bin:/mnt/c/msys64/usr/bin:/mnt/c/Program Files/ffmpeg:/mnt/c/Program Files/NVIDIA Corporation/Nsight Compute 2023.2.0/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Users/yinch/AppData/Local/Programs/Python/Python311/Scripts/:/mnt/c/Users/yinch/AppData/Local/Programs/Python/Python311/:/mnt/c/Users/yinch/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/yinch/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin
Analyzing: target //:extensions (53 packages loaded, 523 targets configured)
ERROR: Analysis of target '//:extensions' failed; build aborted:
INFO: Elapsed time: 29.841s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (53 packages loaded, 523 targets configured)
ERROR: Build failed. Not running target
Building pybind11 extension...
Traceback (most recent call last):
File "/home/tt/.local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
File "/home/tt/.local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/tt/.local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/tmp/pip-build-env-5d2xcjbc/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 434, in build_wheel
return self._build_with_temp_dir(
File "/tmp/pip-build-env-5d2xcjbc/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 419, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-5d2xcjbc/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 341, in run_setup
exec(code, locals())
File "", line 45, in
File "/tmp/pip-build-env-5d2xcjbc/overlay/local/lib/python3.10/dist-packages/setuptools/init.py", line 107, in setup
return distutils.core.setup(**attrs)
File "/tmp/pip-build-env-5d2xcjbc/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/tmp/pip-build-env-5d2xcjbc/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-5d2xcjbc/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-5d2xcjbc/overlay/local/lib/python3.10/dist-packages/setuptools/dist.py", line 1233, in run_command
super().run_command(command)
File "/tmp/pip-build-env-5d2xcjbc/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "", line 28, in run
File "", line 23, in compile_ext
File "/usr/lib/python3.10/subprocess.py", line 421, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/tmp/pip-req-build-nk8q05cy/tools/bazel', 'run', '//:extensions']' returned non-zero exit status 1.
error: subprocess-exited-with-error

× Building wheel for whispercpp (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /usr/bin/python3 /home/tt/.local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmp192izf51
cwd: /tmp/pip-req-build-nk8q05cy
Building wheel for whispercpp (pyproject.toml) ... error
ERROR: Failed building wheel for whispercpp
Failed to build whispercpp
ERROR: Could not build wheels for whispercpp, which is required to install pyproject.toml-based projects
Exception information:
Traceback (most recent call last):
File "/home/tt/.local/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
status = run_func(*args)
File "/home/tt/.local/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 248, in wrapper
return func(self, options, args)
File "/home/tt/.local/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 429, in run
raise InstallationError(
pip._internal.exceptions.InstallationError: Could not build wheels for whispercpp, which is required to install pyproject.toml-based projects
Remote version of pip: 23.2.1
Local version of pip: 23.2.1
Was pip installed by pip? True
Removed build tracker: '/tmp/pip-build-tracker-he5jdcca'
`

To reproduce

install on wsl2 (ubuntu)
pip install git+https://github.com/aarnphm/whispercpp.git

Expected behavior

For the package to install

Environment

python 3.10.12
windows 11 wsl2

@ttforsd ttforsd added the bug Something isn't working label Aug 16, 2023
@mmhy2003
Copy link

mmhy2003 commented Oct 31, 2023

Can you see this part of the error.

File "/home/tt/.cache/bazel/_bazel_tt/eef295a781ab947c7038b674b37d49c9/external/pybind11_bazel/python_configure.bzl", line 173, column 10, in _get_python_bin _fail("Cannot find python in PATH, please make sure "

If you are using Ubuntu 22.04 under WSL, do as I did

sudo ln -s /usr/bin/python3 /usr/bin/python
sudo ln -s /usr/lib/python3 /usr/lib/python

I hope this fix it for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants