Skip to content

Commit 53cc4af

Browse files
committed
README: update install instructions for python virtualenv
1 parent 295ea97 commit 53cc4af

File tree

1 file changed

+47
-28
lines changed

1 file changed

+47
-28
lines changed

README.md

+47-28
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,33 @@ _(If you've come here looking to simply run Electrum,
1818
[you may download it here](https://electrum.org/#download).)_
1919

2020
Electrum itself is pure Python, and so are most of the required dependencies,
21-
but not everything. The following sections describe how to run from source, but here
22-
is a TL;DR:
21+
but not everything. The following sections describe how to run from tar.gz or from source
2322

24-
```
25-
$ sudo apt-get install libsecp256k1-dev
26-
$ python3 -m pip install --user ".[gui,crypto]"
23+
### Install to a python virtualenv
24+
25+
#### Create a python virtualenv
26+
27+
```commandline
28+
$ python3 -m venv $HOME/electrum
2729
```
2830

29-
### Not pure-python dependencies
31+
When the `virtualenv` is created or already exists, activate it:
3032

31-
If you want to use the Qt interface, install the Qt dependencies:
33+
```commandline
34+
$ . $HOME/electrum/bin/activate
3235
```
33-
$ sudo apt-get install python3-pyqt5
36+
37+
#### Install electrum and dependencies
38+
39+
```commandline
40+
$ pip install .[gui,crypto,hardware]
3441
```
3542

43+
This will install Electrum and all required dependencies,
44+
including for Qt desktop GUI and hardware wallets.
45+
46+
#### Not pure-python dependencies
47+
3648
For elliptic curve operations,
3749
[libsecp256k1](https://github.com/bitcoin-core/secp256k1)
3850
is a required dependency:
@@ -47,14 +59,7 @@ $ sudo apt-get install automake libtool
4759
$ ./contrib/make_libsecp256k1.sh
4860
```
4961

50-
Due to the need for fast symmetric ciphers,
51-
[cryptography](https://github.com/pyca/cryptography) is required.
52-
Install from your package manager (or from pip):
53-
```
54-
$ sudo apt-get install python3-cryptography
55-
```
56-
57-
If you would like hardware wallet support,
62+
For more information about hardware wallet dependencies,
5863
[see this](https://github.com/spesmilo/electrum-docs/blob/master/hardware-linux.rst).
5964

6065

@@ -63,38 +68,52 @@ If you would like hardware wallet support,
6368
If you downloaded the official package (tar.gz), you can run
6469
Electrum from its root directory without installing it on your
6570
system; all the pure python dependencies are included in the 'packages'
66-
directory. To run Electrum from its root directory, just do:
71+
directory. You will need to install a few system dependencies:
72+
73+
To use the desktop GUI (Qt5):
74+
6775
```
68-
$ ./run_electrum
76+
$ sudo apt-get install python3-pyqt5
77+
```
78+
79+
Due to the need for fast symmetric ciphers,
80+
[cryptography](https://github.com/pyca/cryptography) is required.
81+
Install from your package manager:
82+
```
83+
$ sudo apt-get install python3-cryptography
6984
```
7085

71-
You can also install Electrum on your system, by running this command:
86+
To run Electrum from its root directory, just do:
7287
```
73-
$ sudo apt-get install python3-setuptools python3-pip
74-
$ python3 -m pip install --user .
88+
$ ./run_electrum
7589
```
7690

77-
This will download and install the Python dependencies used by
78-
Electrum instead of using the 'packages' directory.
79-
It will also place an executable named `electrum` in `~/.local/bin`,
80-
so make sure that is on your `PATH` variable.
91+
This method currently lacks hardware wallet support.
92+
If you need hardware wallet support, you should install as [described above](#install-to-a-python-virtualenv)
8193

8294

8395
### Development version (git clone)
8496

8597
_(For OS-specific instructions, see [here for Windows](contrib/build-wine/README_windows.md),
8698
and [for macOS](contrib/osx/README_macos.md))_
8799

88-
Check out the code from GitHub:
100+
#### Check out the code from GitHub:
89101
```
90102
$ git clone https://github.com/spesmilo/electrum.git
91103
$ cd electrum
92104
$ git submodule update --init
93105
```
94106

95-
Run install (this should install dependencies):
107+
#### create and activate virtualenv
108+
109+
```commandline
110+
$ python3 -m venv $HOME/electrum
111+
$ . $HOME/electrum/bin/activate
112+
```
113+
114+
#### Run install (this should install dependencies):
96115
```
97-
$ python3 -m pip install --user -e .
116+
$ pip install -e .[gui,crypto,hardware]
98117
```
99118

100119
Create translations (optional):

0 commit comments

Comments
 (0)