Reputation: 41
I am attempting to install bpython on Windows 10 and have followed the process to the best of my ability as outlined on the official bpython website and on this helpful GitHub gist.
I am running PowerShell on a 64bit laptop running Windows 10, and so I downloaded the python 3.7 release for Windows AMD 64-bit from the release page which is curses-2.2-cp37-cp37m-win_amd64.whl
.
I already successfully installed bpython via pip, so when I downloaded this wheel file I attempted to install it and got this error:
After this, I downloaded the win32 version curses‑2.2‑cp37‑cp37m‑win32.whl
and ran it just for kicks and it outputs this:
and also was able to run the program successfully one time until I hit the return key while creating a basic hello world function and it output this error:
It now outputs this error any time I attempt to run bpython.
I have both python 2.7 and 3.7 installed on my computer, so I would like to install bpython for both, but need to at least get it to work for one first.
Did I perform the installation incorrectly or is there some other issue or step that I missed?
Upvotes: 4
Views: 6643
Reputation: 172
BTW, instead of downloading curses‑2.2‑cp37‑cp37m‑win32.whl
you can:
pip install windows-curses
Upvotes: 3
Reputation: 4769
The last error happens because bpython fails to write the history file. I just set the history length to zero, read details here.
Here's one-line solution (warning: overwrites bpython config if you wrote any):
Set-Content -Path "$env:userprofile\.config\bpython\config" -Value "[general]`nhist_length=0"
On Windows you have to use bpython-curses.exe
or python -m bpython.cli
, not just bpython
command.
Upvotes: 2