We use open software, this includes the operating system. So we try to do our part that it works...
After upgrading to Ubunut22.04, CellProfiler stopped working.The issue is linked the wxpython package which did not run in Python3.10. The issue can be overcome by installing Python3.8 and running CellProfiler in a Python3.8 environment. This instruction shows how you can make it happen. Start by checking your python version
python3 --version
In my case this is python 3.10.6. So you need to install a lower version python and set up a virtual environment for it. A guide for Python installation can be found here: Guide to Python installation on linux.
First install a "Personal Package Archive" (PPA) a software repository for Python versions. Take the deadsnakes repository
Don't change the version used by your operating system! This can break your system. Just install the Python verion you need in addition to
existing python package. Then use the python version you need in a virtual environment.
To check the status of a given version: I selected python3.8 for CellProfiler. To install a dedicated version: After you have installed Python3.8 there are a couple of additional packages which you need to install before you should set up the
environment As venv is using the build in standard python version to make an environmnet, you cannot use it to make an environment with a different Python version.
Therefore you need to use virtualenv, which you have downloaded before. In this example I am making an environment named "cp4_8".
The extension is defining which Python version you would like to have in the environment Then activate the environment and check whether the environment has the desired python versioni Do this in the activated CellProfiler environmnet Numpy is required. Install it with: Then install CellProfiler Everything fine? Did you get error messages? If yes, try to follow the error messages to install missing packages To run cellprofiler type: After you are done, inactivate the python environmnet with: In general, to use cellprofiler, activate the environment, run cellprofiler, deactivate the environment Take these steps to install Python3.8
sudo apt update
sudo apt -y upgrade
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-cache policy python(version)
sudo apt install python3.8
sudo apt install python3-virtualenv
sudo apt install -y make gcc build-essential libgtk-3-dev
sudo apt-get install -y python3-pip openjdk-11-jdk-headless default-libmysqlclient-dev libnotify-dev libsdl2-dev
sudo apt-get install -y freeglut3 freeglut3-dev libgl1-mesa-dev libglu1-mesa-dev libgstreamer-plugins-base1.0-dev libgtk-3-dev
libjpeg-dev libsm-dev libtiff-dev libwebkit2gtk-4.0-dev libxtst-dev
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
export PATH=$PATH:/home/ubuntu/.local/bin
sudo apt install python3.8-distutils
sudo apt-get install python3.8-dev
Then make a virtual environment in python3.8
virtualenv cp4_8 --python=python3.8
source cp4_8/bin/activate
python --version
CellProfiler installation:
pip install numpy
pip install cellprofiler
cellprofiler
deactivate