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

Not working on Windows 11 #681

Closed
dasbootbee opened this issue Apr 9, 2023 · 4 comments
Closed

Not working on Windows 11 #681

dasbootbee opened this issue Apr 9, 2023 · 4 comments

Comments

@dasbootbee
Copy link

Python 3.10 installed from Windows Store
Buku 4.7.1 installed via pip

First issue: Once installed via pip, the path is not updated to the scripts directory so running "buku" on the command line results in the following error:

buku: The term 'buku' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Running the executable from the scripts directory results in the following error:

C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts> .\buku.exe
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\buku.py", line 57, in
import readline
ModuleNotFoundError: No module named 'readline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts\buku-script.py", line 33, in
sys.exit(load_entry_point('buku==4.7.1', 'console_scripts', 'buku')())
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts\buku-script.py", line 25, in importlib_load_entry_point
return next(matches).load()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\importlib\metadata_init_.py", line 171, in load
module = import_module(match.group('module'))
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\buku.py", line 59, in
import pyreadline as readline # type: ignore
ModuleNotFoundError: No module named 'pyreadline'

@jarun
Copy link
Owner

jarun commented Apr 9, 2023

Probably we don't install it to the PATH. So you may have to create a shortcut.

The second error is because pyreadline is not installed on your setup. pyreadline3 is a requirement for buku.

@dertuxmalwieder @rachmadaniHaryono could you please have a look?

@LeXofLeviafan
Copy link
Collaborator

Release 4.7.1 is dated Jul 2, 2022.
Windows installation fixes were added in Jan 2023.
There's a newer release but it doesn't seem to be on PyPI. I believe pip supports installing packages from downloaded source archives though.

As for PATH, it's not normally managed by Python packages; if the Windows Python installer did not update it to include the required directory, you may need to update it yourself.
…Alternatively, you may try using pipx – it's intended for installing Python application packages, and it appears to include a utility for fixing PATH issues (at least those related to pipx functionality).

@dertuxmalwieder
Copy link
Contributor

So… nothing to do for me? ;-)

@dasbootbee
Copy link
Author

dasbootbee commented Apr 10, 2023

This worked:

python -m pip install https://github.com/jarun/buku/archive/refs/tags/v4.8.zip

I do not see the previous errors using this version.

pipx is indeed the way to go:

python -m pip install --user pipx
pipx ensurepath <-- Ensures the whacky Windows Store Python scripts directory is added to PATH
pipx install https://github.com/jarun/buku/archive/refs/tags/v4.8.zip

Now just running 'buku' from anywhere works.

@jarun jarun closed this as completed Apr 15, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants