activate Electrum command line interface (mac)

0

I installed Electrum on my Mac from python source. The GUI works fine, but I can't use the CLI. Thus, I get :

dyn907-208:Electrum-2.6.4 name$ electrum help
-bash: electrum: command not found

both when I type this command (for intance) in a regular bash, or under the "console" tab of the GUY.

What did I miss?

rgds

hartmut

Posted 2016-06-08T12:18:50.227

Reputation: 571

Answers

1

It might be in a subdirectory, so run: find . -name electrum

Or if it is in ., it might not have execute permissions: chmod +x electrum

Or it might be named something else: find . -perm -100

Or you might not have . in your PATH: ./electrum help

user36303

Posted 2016-06-08T12:18:50.227

Reputation: 766

Thx a lot. Since 1. it is indeed in a subdirectory but I was in it when I tried to run it on the CL, 2. it has all permissions activated, 3. using find . -perm -100 | grep electrum gives me electrum; I feel like the fourth possibility is probably the explanation. But I don't really understand it. Can you point me to some resource to understand better your point please?hartmut 2016-06-09T08:09:29.227

1PATH is an environment variable that tells your shell where to find programs, if you do not supply the path to them explicitely. Typically, there's /bin, /usr/bin, and a few others. If you're root, also /sbin and /usr/sbin. I also put $HOME/bin for my own things. . is current directory (so moves around whenever you move around the directory structure). so ./electrum means "run the file named electrum located in the directory I'm in now", while electrum means "run the file named electrum wherever you find it in your PATH" (a bit more complicated due to aliases, functions, etc)user36303 2016-06-09T08:52:43.200

Thx a lot. I m in Electrum's directory. I type ./electrum, meaning "run the file named electrum located in the directory I'm in now". But it does not work. Any other possibility?hartmut 2016-06-10T09:44:23.083

To find out if there is a file called electrum in ., run: ls -l electrumuser36303 2016-06-10T10:30:27.080

Raargh, why does it post every time I press enter... Anyway: check it has x permission. If not: chmod +x electrum. If there is no electrum file there, cd to wherever there is one, and chmod +x electrum too if neededuser36303 2016-06-10T10:31:21.780

ls -l | grep electrum yields: -rwxrwxr-x@ 1 username staff 14265 8 Mar 08:51 electrumhartmut 2016-06-10T10:57:51.460

That looks right. Then be more precise about what happens when you run it with "./electrum". You said "it does not work", but there could be multiple reasons. Like binary not found (apparently not the case), python not found, bad python version, python libs missing, etc.user36303 2016-06-10T11:04:21.343