You are not logged in.
Pages: 1
I have installed miniconda3 from the AUR
But now `/usr/bin/env python` opens `/opt/miniconda3/bin/python`.
This breaks a lot of my scripts since that python installation lacks the packages I need.
How can I make it point to `/usr/bin/python` again?
Last edited by hully (2022-12-27 16:53:14)
Offline
If you only built a package based on this PKGBUILD and installed it, this situation is not expected to happen. Something is missing in the description.
Didn’t you also modify your shell’s rc files by sourcing “/opt/miniconda3/etc/profile.d/conda.sh”? Or otherwise making them point to conda version?
If not, didn’t you run their installation script⁽¹⁾ directly instead of doing this through makepkg+pacman?
____
⁽¹⁾ One listed in the sources array.
Sometimes I seem a bit harsh — don’t get offended too easily!
Offline
What are the output of which -a python and of echo $PATH ?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Didn’t you also modify your shell’s rc files by sourcing “/opt/miniconda3/etc/profile.d/conda.sh”?
Yes I did.
It asked me to run some command which put this in my "~/.config/fish/config.fish":
# >>> mamba initialize >>>
# !! Contents within this block are managed by 'mamba init' !!
set -gx MAMBA_EXE "/usr/bin/micromamba"
set -gx MAMBA_ROOT_PREFIX "/home/raffaele/micromamba"
$MAMBA_EXE shell hook --shell fish --prefix $MAMBA_ROOT_PREFIX | source
# <<< mamba initialize <<<
What are the output of which -a python and of echo $PATH ?
Here it is:
❯ which -a python
/opt/miniconda3/bin/python
/usr/bin/python
Offline
So how can I use my system's python while at the same time keeping these lines:
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/opt/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/opt/miniconda3/etc/profile.d/conda.sh" ]; then
. "/opt/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/opt/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
at the end of my .bashrc?
They are needed otherwise conda complains when I activate environments
Offline
This breaks a lot of my scripts
If they are your scripts and you want them to use /bin/python rather than whichever python is indicated by /bin/env, then just fix the shebang.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
I would like to remove those lines from my .bashrc because (1) it slows down opening of interactive shells significantly (2/3 sec) and (2) I would like to install python libraries with pacman, so that I can replicate the package list on other systems.
But at the same time I prefer not to lose the possibility to manage conda environments, as it seems that they are used by every deep learning frameworks / libraries
Offline
So remove the miniconda init junk from your shell init scripts and manually activate the conda environments when you need it.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Online
So remove the miniconda init junk from your shell init scripts and manually activate the conda environments when you need it.
I think I will do that. Thanks!
Offline
Pages: 1