Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use the Anaconda environment on blender?

I'm having problems to use some modes like numpy and pandas on blender, apparently the blender's python do not allow us to install packages using pip; so I thought that I could resolve this issue changing its environment to the Anaconda or something like that. I looked for solutions, but all I founded worked on windows but I use ubuntu. If someone can help me, I really appreciate it.

like image 360
mack_hyuuga Avatar asked Oct 24 '25 06:10

mack_hyuuga


1 Answers

Here is how I proceed:

Deactivate current python used by Blender

→ Go to your Blender files (for example: cd /usr/share/blender/3.0/)

→ Deactivate the current python version: mv python _python

Create a new anaconda environment

Warning

As mentioned here, the python version (major and minor) must match the one that Blender comes with. For Blender 3.0, python 3.9 is ok.

→ Enter : conda create --name=blender python=3.9

→ When the installation is finished, enter: conda activate blender

Link the Anaconda environment to Blender

→ If you have installed Anaconda with the default parameters, your conda env’ should be installed here: ~/anaconda3/envs/blender/

→ So, enter: sudo ln -s ~/anaconda3/envs/blender/ python

This creates a junction between the python folder in the Blender files and the folder in the Anaconda environments files.

Install new python packages

In a terminal, run: pip (or conda) install [package_name] under the blender anaconda environment (use: conda activate blender to switch environment)

I have rewritten these instructions from another tutorial I have written here The tutorial is for another tool, but I needed to setup quite the same environment as what you want, I guess.

like image 162
Failxxx Avatar answered Oct 25 '25 20:10

Failxxx