[HowTo] Install the actual Anaconda version and fix the DPI and MESA-LOADER issues

Hi,

I’m doing AI developments and moved from Ubuntu to Manjaro, which works really, really great; love it.

Here are the steps to:

  • Install the actual version of Anaconda by yourself
  • Fix the DPI scaling issue (Fonts / Icons are way too large)
  • Fix the MESA-Loader issue

1.0 Installation of Anaconda

Install some packages, needed by Anaconda with:

pacman -Sy libxau libxi libxss libxtst libxcursor libxcomposite libxdamage libxfixes libxrandr libxrender mesa-libgl  alsa-lib libglvnd

Download the package from https://www.anaconda.com/products/individual . You can just copy the link by right-clicking on the Download - button and select “Copy link address”.

Let’s assume the link is somethink like: https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh, then you type:

cd ~
wget https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh

After Download, change the execution flag

chmod +x ~/Anaconda3-2021.11-Linux-x86_64.sh

and start the script, in this example:

./Anaconda3-2021.11-Linux-x86_64.sh

saying “yes” to everything. Then close and re-open the Terminal to set the environment (or source your profile).

Start Anaconda to make sure the anaconda-navigator.ini is written (otherwise editing the Anaconda config will not work):

anaconda-navigator

close it.

However, after installation I was facing the DPI - issues as described above. Here’s how I fixed it:

1.1 Edit the Anaconda config:

nano ~/.anaconda/navigator/anaconda-navigator.ini

and set:

enable_high_dpi_scaling = True

1.2 Create an Anaconda startup file

nano ~/anaconda.desktop

and paste the following lines into it:

[Desktop Entry]
Type=Application
Name=Anaconda
Exec=/usr/bin/env QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCALE_FACTOR=1.5 /home/uwuertz/anaconda3/bin/anaconda-navigator
Terminal=false
Icon=/home/uwuertz/anaconda3/lib/python3.9/site-packages/anaconda_navigator/static/images/anaconda-icon-256x256.png

Even if you have this already:
There is a different command line for starting up Anaconda: “Exec=/usr/bin/env QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCALE_FACTOR=1.5 /home/uwuertz/anaconda3/bin/anaconda-navigator” !

Please check and change the directory “/home/uwuertz/…” to your needs and double check the python version! Otherwise it will not work!

Install it with:

sudo desktop-file-install anaconda.desktop

Caution: This fix will only work, if you start Anaconda via the icon.

1.3 If you want to execute Anaconda from cli, you have to set the scaling factor manually

export QT_AUTO_SCREEN_SCALE_FACTOR=0
QT_SCALE_FACTOR=1.5 anaconda-navigator

2.0 In case you get messages after executing Anaconda, such as:

“libGL error: MESA-LOADER: failed to open iris:…”

then execute:

mv ~/anaconda3/lib/libstdc++.so.6 ~/anaconda3/lib/libstdc++.so.6.bck

to fix this issue. As a last step you can check the installation for updates. To do this, open a terminal and execute:

conda update conda

At least on my Manjaro, this has worked perfect for me. Hope it helps for some others.

2 Likes