-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Command Line do not work on Windows #2592
Comments
Try |
Same issue here on 2.8.3. Even running in the electrum directory directly. Tried both the installer & portable versions. |
Really no one will help? |
As a workaround, you can run Electrum from source to use the CLI. |
Is there any instruction? |
Any update on when the windows command line interface will be working? Thanks. |
For instructions on how to run Electrum from source (and be able to use the command line interface), see the "Installation from Python sources" section on https://electrum.org/#download. Of course it would be better if that would be possible from the official binaries but we don't have any news on that yet. |
This would either need to be solved upstream pyinstaller/pyinstaller#2117; or we would need to use some other tool to create the binaries, which just for this issue, won't happen. |
I ended up creating a ubuntu virtual machine and running it there. It was still a bit of a struggle to get it up, communicating, and working properly. This is a pretty critical step I found on Stack Overflow: Be sure you are setting the rpchost and rcpport values before starting the daemon otherwise it uses a random port. eg. electrum setconfig rpchost 0.0.0.0 |
In case you need to start Electrum as daemon in Windows, run it from the console: |
You guys may want to check out this PR for Electron Cash: Electron-Cash#1295 It's pretty easily adapted/put into Electrum too. We'll probably merge it later today. It solves the problem perfectly for windows. Requires psutils be installed in the windows built at least. |
It is only almost perfect, but as good as it is going to get. |
Oh so the password prompt may fail.. hmm. Not a huge deal, I hope. |
If you want to start electrum from Windows in console mode, you can download (if you do not have it already) Git for Windows (https://git-scm.com/download/win). The default installation has the Windows Explorer integration selected (Git Bash and Git GUi here). During the installation select "Use MinTTY (the default terminal of MSYS2)" that will provide what you need to run electrum from the console. Once installed, open the File Explorer, right click on the file's area, and select Git Bash Here You can run electrum like this:
or like this
|
@turcol Nice advice. Yes, MSYS does a better job of passing the console on to child processes, even if they declare themselves as 'windowed' (which is what Electrum and Electron Cash declare via pyinstaller). Windows So yes, a workaround is to use MSYS or MINGW on Windows (or cygwin, probably). Definitely. Still -- if the Electrum programmers get time -- the ideal solution is to also support |
MSYS does not correctly load |
The "setup" Windows binary we distribute allows users to "install" Electrum on their system. The distributable is created by NSIS. During installation a bunch of files will get unpacked in %programfiles(x86)%/Electrum, including an "inner" exe that will be the entrypoint for the user to start the application. A shortcut is also created for the inner exe. With this change, there will now be two inner EXEs. One the same as before, the other with a "-debug" suffix in its name. The debug exe is built as a "console" application (as opposed to a "windowed" application), so when launched via double-click a black console window would appear; and also importantly stdin/stdout are handled properly for it (unlike for "windowed" programs). (see spesmilo#2592) There will not be a shortcut or similar for the debug exe; it would just be there as a debugging option we can instruct users to use when needed. In particular early crashes during startup are hard to debug without stdout/stderr. (see e.g. spesmilo#6601)
…6603) The "setup" Windows binary we distribute allows users to "install" Electrum on their system. The distributable is created by NSIS. During installation a bunch of files will get unpacked in %programfiles(x86)%/Electrum, including an "inner" exe that will be the entrypoint for the user to start the application. A shortcut is also created for the inner exe. With this change, there will now be two inner EXEs. One the same as before, the other with a "-debug" suffix in its name. The debug exe is built as a "console" application (as opposed to a "windowed" application), so when launched via double-click a black console window would appear; and also importantly stdin/stdout are handled properly for it (unlike for "windowed" programs). (see #2592) There will not be a shortcut or similar for the debug exe; it would just be there as a debugging option we can instruct users to use when needed. In particular early crashes during startup are hard to debug without stdout/stderr. (see e.g. #6601)
…pesmilo#6603) The "setup" Windows binary we distribute allows users to "install" Electrum on their system. The distributable is created by NSIS. During installation a bunch of files will get unpacked in %programfiles(x86)%/Electrum, including an "inner" exe that will be the entrypoint for the user to start the application. A shortcut is also created for the inner exe. With this change, there will now be two inner EXEs. One the same as before, the other with a "-debug" suffix in its name. The debug exe is built as a "console" application (as opposed to a "windowed" application), so when launched via double-click a black console window would appear; and also importantly stdin/stdout are handled properly for it (unlike for "windowed" programs). (see spesmilo#2592) There will not be a shortcut or similar for the debug exe; it would just be there as a debugging option we can instruct users to use when needed. In particular early crashes during startup are hard to debug without stdout/stderr. (see e.g. spesmilo#6601) (cherry picked from commit 653a24a) # Conflicts: # contrib/deterministic-build/electrum-redd-locale
Try this, in a PowerShell terminal run: set-alias electrum (get-item "C:\Program Files (x86)\Electrum\electrum-*-debug.exe")
electrum help |
@omidkrad perfect. Thank you so much. |
@omidkrad, didn't work. UPD: It's a problem with stdout. Redirecting output to a file works: |
Version: 2.8.2
OC: Windows 7
Environment variable:
Cmd Prompt:
electrum is not a command
The text was updated successfully, but these errors were encountered: