Skip to content

Commit

Permalink
Merge pull request #770 from multiversx/install-mxpy
Browse files Browse the repository at this point in the history
Install mxpy using pipx
  • Loading branch information
popenta authored Dec 14, 2023
2 parents 612297d + 02c2505 commit 7128334
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 5 deletions.
48 changes: 43 additions & 5 deletions docs/sdk-and-tools/sdk-py/installing-mxpy.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,57 @@ title: Installing mxpy

[comment]: # (mx-abstract)

How to install mxpy

This page describes how to install **mxpy** (the CLI tool). The recommended way to install **mxpy** is by using the `mxpy-up` script.
This page describes how to install **mxpy** (the CLI tool). The recommended way to install **mxpy** is by using **pipx**. If you want to learn more about **pipx** you can check out [this page](https://pipx.pypa.io/stable/#overview-what-is-pipx).

**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.

[comment]: # (mx-context-auto)

## **Prerequisites**

Before installing **mxpy**, please make sure you have a working **Python 3** environment:
Before installing **mxpy**, please make sure you have a working **Python 3** environment. You'll need **Python 3.8** or later on Linux or MacOS.

[comment]: # (mx-context-auto)

## **Install using pipx**

:::info
Keep in mind that installing using **pipx** is only available for **mxpy v9.2.0** or later.
:::

You'll need **pipx** installed on your machine. For more details on how to install **pipx** check out [this page](https://pipx.pypa.io/stable/#install-pipx).

- **3.8** or later on Linux and MacOS
In order to install **mxpy** using `pipx`, run the following command:

```sh
pipx install multiversx-sdk-cli
```

This will simply install the latest version available.

In case you want to install a specific version you should also specify the version.
```sh
pipx install multiversx-sdk-cli==9.2.0
```

You can also install **mxpy** directly from a GitHub branch. Replace `branch_name` with your desired branch and run the following command:
```sh
pipx install git+https://github.com/multiversx/mx-sdk-py-cli@branch_name
```

To check that **mxpy** installed successfully you can run the following command:
```sh
mxpy --version
```

[comment]: # (mx-context-auto)

## **Upgrade mxpy using pipx**

To upgrade **mxpy** to a newer version you can simply run the following command:
```sh
pipx upgrade multiversx-sdk-cli
```

[comment]: # (mx-context-auto)

Expand Down
15 changes: 15 additions & 0 deletions docs/sdk-and-tools/sdk-py/mxpy-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ This page will guide you through the process of handling common tasks using **mx

## Upgrading mxpy

[comment]: # (mx-context-auto)

### Upgrade using pipx

In case you used **pipx** to install **mxpy**, to upgrade to a newer version, you can run the following command:
```sh
pipx upgrade multiversx-sdk-cli
```

[comment]: # (mx-context-auto)

### Using the installation script

This method should _only_ be used if you installed **mxpy** as described [here](installing-mxpy.md#install-using-mxpy-up).

If you are using a older version of `mxpy` you can simply upgrade to a newer version by typing the following commands in a terminal:

```sh
Expand Down

0 comments on commit 7128334

Please sign in to comment.