Skip to content

Commit d16ee95

Browse files
Remove redundant details on mxpy installation page.
1 parent 93a949d commit d16ee95

File tree

1 file changed

+10
-90
lines changed

1 file changed

+10
-90
lines changed

docs/sdk-and-tools/sdk-py/installing-mxpy.md

Lines changed: 10 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: Installing mxpy
77

88
How to install mxpy
99

10-
This page describes how to install **mxpy** (the CLI tool). The recommended way to install **mxpy** is by using the `mxpy-up` facility.
10+
This page describes how to install **mxpy** (the CLI tool). The recommended way to install **mxpy** is by using the `mxpy-up` script.
1111

1212
**mxpy** is currently supported on Linux and MacOS. Some of its features might work on Windows as well, although using **mxpy** on Windows is neither recommended, nor supported at this time.
1313

@@ -19,110 +19,30 @@ Before installing **mxpy**, please make sure you have a working **Python 3** env
1919

2020
- **3.8** or later on Linux and MacOS
2121

22-
Smart contracts written in C require the ncurses library routines for compiling. Install them using the following:
23-
24-
For Linux:
25-
26-
```
27-
sudo apt install libncurses5
28-
```
29-
30-
For MacOS:
31-
32-
```
33-
brew install ncurses
34-
```
35-
3622
[comment]: # (mx-context-auto)
3723

38-
## **Install using mxpy-up (recommended)**
24+
## **Install using mxpy-up**
3925

40-
In order to install **mxpy** using the `mxpy-up` installation script, run the following commands in a terminal:
26+
In order to install **mxpy** using the `mxpy-up` script, run the following commands:
4127

4228
```
4329
wget -O mxpy-up.py https://raw.githubusercontent.com/multiversx/mx-sdk-py-cli/main/mxpy-up.py
4430
python3 mxpy-up.py
4531
```
4632

47-
This will create a light Python virtual environment (based on `venv`) in `~/multiversx-sdk/mxpy-venv `. Since `mxpy v6.0.0` we do not alter the **`$PATH`** variable.
48-
You'll need to manually include `~/multiversx-sdk` in your **`$PATH`** variable (by editing the appropriate `.profile` file) as done bellow:
49-
```
50-
export PATH="$HOME/multiversx-sdk:$PATH"
51-
```
52-
53-
[comment]: # (mx-context-auto)
54-
55-
### **Troubleshooting and other notes**
33+
This will create a Python virtual environment in `~/multiversx-sdk/mxpy-venv`.
5634

57-
On Ubuntu 20.04, if you receive the error: `invalid command 'bdist_wheel'` - run the following command, then retry mxpy-up:
35+
## Make mxpy available in your shell
5836

59-
```
60-
pip3 install wheel
61-
python3 mxpy-up.py
62-
```
63-
64-
On MacOS, you can switch to Python 3.8 as follows:
37+
In order to have the command **mxpy** available in your shell after install, you'll need to manually include `~/multiversx-sdk` in your **`$PATH`** environment variable by editing the appropriate shell profile file: `~/.bashrc` (for Bash) or `~/.zshrc` (for Zsh). For example:
6538

6639
```
67-
68-
brew unlink python
69-
brew link --force [email protected]
70-
python3 --version
40+
echo "export PATH="\$HOME/multiversx-sdk:\$PATH"" >> ~/.bashrc
41+
echo "export PATH="\$HOME/multiversx-sdk:\$PATH"" >> ~/.zshrc
7142
```
7243

73-
[comment]: # (mx-context-auto)
74-
75-
## **Install without mxpy-up**
76-
77-
If you'd like to install without relying on the easy installation script, please read this section. Otherwise, feel free to skip it.
78-
79-
Make sure you also have **pip3** installed.
80-
81-
[comment]: # (mx-context-auto)
82-
83-
### **Prepare PATH**
84-
85-
In order to have the command **mxpy** available in your shell after install, make sure you adjust the `PATH` environment variable as described below:
86-
87-
On Linux in `~/.profile`:
88-
89-
```
90-
export PATH="$HOME/.local/bin:$PATH"
91-
```
92-
93-
On MacOS in `~/.bash_profile` or `~/.zshrc` if you’re using `zsh`:
94-
95-
```
96-
export PATH=$HOME/Library/Python/3.8/bin:${PATH}
97-
```
98-
99-
:::note add the right version
100-
In the snippet above, replace `3.8` with your actual `MAJOR.MINOR` version of Python. This can be found by running:
101-
102-
```
103-
python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')"
104-
```
105-
106-
:::
107-
108-
You may need to restart your user session for these changes to take effect.
109-
110-
[comment]: # (mx-context-auto)
111-
112-
### **Install and smoke test**
113-
114-
In order to install **mxpy**, issue the following command:
115-
116-
```
117-
pip3 install --user --upgrade --no-cache-dir multiversx-sdk-cli
118-
```
119-
120-
[comment]: # (mx-context-auto)
121-
122-
### **Troubleshooting**
123-
124-
If you encounter encoding-related issues at installation time, such as: `UnicodeDecodeError: 'ascii' codec can't decode byte`, then please set `PYTHONIOENCODING` before running the installation command:
44+
Then, open a new shell and run the following command to verify that **mxpy** is installed correctly:
12545

12646
```
127-
PYTHONIOENCODING=utf8 pip3 install --user --upgrade --no-cache-dir mxpy
47+
mxpy --version
12848
```

0 commit comments

Comments
 (0)