вторник, 21 ноември 2023 г.

Activate and update a missing conda environment

I use conda to manage my python packages and libraries because otherwise, system updates break everything way too often. Recently, I had two problems with it:

1. After one of the system updates, conda got messed up and I copied the files from my backup. So the names of the conda environments disappeared.

1. To fix the names if you installed your environments in a new directory, you can use:

$conda config --show envs_dirs

this shows where your default directories are and then to add another path, use (link):

$conda config --append envs_dirs /home/<user>/anaconda3/envs

or if you want to keep your default dir (which I didn't care about):
$conda config --prepend envs_dirs /home/<user>/anaconda3/envs)
This at least added my old environments to the environment.txt

You can list the path to all environments -

$conda env list

And then, if you activate with either

$conda activate NAMEENV

or, if the short name is not available, you can do it with the full path:

$conda activate /home/user/anaconda3/envs/NAMEENV
 

Other imporant files and command:

$cat  /home/denijane/.condarc

$conda info

$conda info -e

2. I was getting a problem in jupyter with one of my packages
libstdc++.so.6: version `GLIBCXX_3.4.32' not found
This was solved by:

$conda activate /home/user/anaconda3/envs/NAMEENV

$conda update --all

which updated all the packages and fixed their broken dependencies. I tried with "conda install libgcc" but conda wouldn't install it.

I also tried to modify the PATH

$export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/your/path/to/conda/env/lib 

because I thought the file is there but it cannot find it, ut again, but this didn't work and in the end I had to do the "update --all"

четвъртък, 28 септември 2023 г.

sudo not acceptimg my password

It happened after I had to kill plasma and kwin because everything froze over an external wifi adapter. I found the answer here:

systemctl status systemd-homed

If it says something other than active, use

systemctl start systemd-homed

to start it again. After that I had my password working again.

събота, 2 септември 2023 г.

Error unmounting /dev/sda: target is busy

 My ssd had wouldn't unmount for unknown reasons, since everything that was using it was closed I was very surprised and annoyed. The error it would give me when I tried to unmount it in console was:

umount /run/media/user/ssd
Error unmounting block device 8:0: GDBus.Error:org.freedesktop.UDisks2.Error.DeviceBusy: Error unmounting /dev/sda: target is busy

So I had to do (following this):

 sudo lsof /dev/sda

That gave me the process that was "using" the hard. It was xdg-docum for a movie that was not playing or anything but apparently, the hard drive thought it was. So after I killed the process I could normally unmount it from Dolphin.