user1584421
user1584421

Reputation: 3863

catkin_make uses the anaconda python version

I am in my native (non conda) python, after a conda deactivate operation. I can confirm that the python that is being used, is NOT the anaconda one, with which python3, that gives me /usr/bin/python3.

However, when i perform a catkin_make, it uses the anaconda one.

Using PYTHON_EXECUTABLE: /home/user1/anaconda3/bin/python3

How can i make sure that it will NOT use the conda one?

These are the contents of the .bashrc file:

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/user1/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/home/user1/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/home/user1/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/home/user1/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

export PYTHONPATH="${PYTHONPATH}:/usr/lib/freecad-daily-python3/lib:/usr/share/freecad-daily/Mod/Draft/"
source /opt/ros/noetic/setup.bash

Upvotes: 1

Views: 1289

Answers (1)

user1584421
user1584421

Reputation: 3863

The solution is to delete the build folder after turning off anaconda. CMake will cache the Python executable it finds.

conda deactivate, delete build folder, catkin_make.

Upvotes: 2

Related Questions