Troubleshooting Guide

Solve common issues when working with Synnax in Python.

The following sections outline common issues our users encounter when working with the Synnax Python client. To get started, select your operating system below:

Linux

MacOS

Windows

Installing Python

If you’re using Amazon Linux on an EC2 instance or another Red hat-based distribution, then you may install python using yum.

sudo yum install python3.11.x86_64 python3.11-devel.x86_64 python3.11-pip.noarch

If you are using Ubuntu, Ubuntu 22.04 comes with Python 3.10 pre-installed. If you’re using an older version of Ubuntu or want the latest version of Python, we recommend using the deadsnakes PPA along with apt.

First we need to update the local package index:

sudo apt update

Then, we need to install common dependencies that require Python:

sudo apt install build-essential software-properties-common -y

Next, we need to add the deadsnakes PPA:

sudo add-apt-repository ppa:deadsnakes/ppa

Then we need to update the local package index again:

sudo apt update

Finally, we can install Python 3.11:

sudo apt install python3.11 -y

We can check that Python 3.11 is installed by running:

python3.11 --version

If you have multiple versions of Python installed, running the python command may point to an older version than the most recent one available.

Incorrect Python Version or Command Not Found

Synnax requires Python 3.10 or higher to work correctly. You can check your Python version by running:

python --version

If you get an output saying Python 3.10.x or higher, you’re good to go! If the output is a different version, or just says command not found, keep reading.

Python Command Is Under a Different Name

Some systems have multiple Python versions installed, and the python command may point to an older version than the most recent one available. Try running the following commands to see if you have a newer version of Python installed under a different name:

python3 --version
python3.10 --version
python3.11 --version

If any of these commands output a version number at or above 3.10, you can use that command instead of python to work with Synnax.

Python Is not Available on Your PATH

If you’ve checked for alternative commands and still get an older version or a command not found error, it’s likely that Python is not available on your PATH.

Find where Python is installed

To fix this issue, you’ll first need to find where Python is installed on your system. If you’ve used the deadsnakes PPA, it’s likely that Python is installed in /usr/bin/python{version} where {version} is the version of Python you have installed.

If you used Anaconda or the official installer, Python may be installed elsewhere.

Add Python to your PATH

Once you’ve found where Python is installed, you’ll need to modify your PATH variable to include it. To do this temporarily, run the following command:

export PATH="/usr/bin:$PATH"

To make this change permanent, you’ll need to edit your ~/.zshrc file or ~/.bashrc file. To do this, run the following command:

echo 'export PATH="/usr/bin:$PATH"' >> ~/.bashrc

Then, you’ll need to refresh your terminal by running:

source ~/.bashrc

Finally, retry the command listed above to check your Python version.

Still not working?

If you’ve followed the steps above and still can’t get Python to display the correct version, your PATH variable may have multiple Python installations listed, where an earlier version overrides the newer one. Try searching through your PATH variable for any other Python installations and remove them. You can check the contents of your PATH variable by running this command:

echo $PATH