Electrum: Command Line do not work on Windows

Created on 10 Jul 2017  路  18Comments  路  Source: spesmilo/electrum

Version: 2.8.2
OC: Windows 7

Environment variable:
2017-07-10_21-58-52

Cmd Prompt:
2017-07-10_22-00-16

electrum is not a command

OS-windows 馃獰 bug 馃悶

All 18 comments

Try electrum-2.8.2 instead.

The list of commands does not appear:
2017-07-10_23-01-21

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?

This is my problem too.
I have searched a lot but there is no answer.
some people say there is no command line mode in windows for electrum.
If its true please add it or give me some help to build it by myself.
image

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 https://github.com/pyinstaller/pyinstaller/issues/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
electrum setconfig rpcport 7777
electrum daemon start

In case you need to start Electrum as daemon in Windows, run it from the console:
".\electrum.exe daemon"

You guys may want to check out this PR for Electron Cash: https://github.com/Electron-Cash/Electron-Cash/pull/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. sys.stdin is not working when attaching to a console.

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:

"C:\Program Files (x86)\Electrum\electrum-3.3.4.exe" -v

or like this

"C:\Program Files (x86)\Electrum\electrum-3.3.4.exe" help

image

image

@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 cmd.exe doesn't then pass on the console to a 'windowed' process because it would break some legacy programs ... (I presume).

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 cmd.exe -- our recent commit to Electron Cash does this quite nicely, and I think it can be ported to Electrum with close to 0 code changes. /end advertisement for EC. :)

MSYS does not correctly load hid libraries yet, but I've made a pull request for this here:

https://github.com/apmorton/pyhidapi/pull/22

Was this page helpful?
0 / 5 - 0 ratings