Reputation: 498
I am trying to execute a python file using the python from blender. I have downloaded and placed the blender inside my user's home directory. But everytime I try to execute blender command I get the following error:
Command blender not found, but can be installed with:
sudo snap install blender # version 2.79b, or
sudo apt install blender
See 'snap info blender' for additional versions.`
My current directory is:
$ pwd
/home/rishik/Applications/blender-2.79b-linux-glibc219-x86_64
I executed the following:
blender --background python somepythonfile.py
I do not understand how to invoke python from blender now.
Upvotes: 0
Views: 4054
Reputation: 46933
Linux (by default) doesn't put the current working directory in the search PATH
. If your blender directory is not in PATH
, then you need to specify a full path, even for the current directory:
./blender --background python somepythonfile.py
You can add .
to the search path, but this is considered a bad idea due to the possibility of malware impersonating a common command (like ls
).
Upvotes: 2