NB: This is a revised and updated version of my original question. You can also see the relevant discussion on meta as to why it was closed and reopened.

On June 29th I asked what I thought was a very simple, straight forward question: Can files be queued for animation? The answer, basically, was yes, if you do as explained in the manual on the Render/Command Line page:

enter image description here

Although it didn't explain that the word 'blender' in the syntax means the entire path to blender (or does it?), I worked it out (or did I?). Maybe that is considered to be common sense? (This could be an indication of where the problem lies!)

Now, for those of you who asked: There are two ways that I can start blender from the command line. First open Terminal. It looks like this:

enter image description here

1 - Type 'open' and space at the command line, then drag blender.app from /Applications/Blender/:

enter image description here

to the Terminal window:

enter image description here

Press return, and blender opens, then if you quit Terminal, blender quits too.

2 - Type 'open' and space at the command line, then drag blender (Unix Executable File) from /Applications/Blender/blender.app/Contents/MacOS/:

enter image description here

to the Terminal window:

enter image description here

Press return, and blender opens, and another Terminal window opens with:

enter image description here

then if you quit Terminal, blender quits too.

Now back to the issue. Since I first asked this question I have been told several times that I must set up the $PATH environment variable. I thought I had done that but now I'm not sure!

I typed sudo nano /etc/paths at the command prompt:

enter image description here

Then return, and got this:

enter image description here

Then I added the path to blender:

enter image description here

and saved it. Then to check it I typed in echo $PATH and the result shows the path has been added:

enter image description here

I have a feeling this path is not the correct one for $PATH. This is the result of an attempt to do a background render:

enter image description here

'blender: command not found'.

Additional update:

I tried what Aldrik and zeffii suggested, to change the $PATH variable setting to /Applications/Blender/blender.app/Contents/MacOS, then attempted to do a background render only to have blender quit before doing anything:

enter image description here

Then, after some searching, I found this:

enter image description here http://david-martinez.tumblr.com/post/28083831730/environment-variables-and-mountain-lion

I tried it:

enter image description here

and got nothing!

  • $\begingroup$ @zeffii, I was originally urged to give more details, and probably went way overboard hoping someone might be able to help! If you don't mind editing it, that would be great. :) I thought maybe I was the only one with this problem!! $\endgroup$
    – SteveW
    Aug 30 '13 at 22:06
  • $\begingroup$ Related: How to launch Blender in console mode from the Dock $\endgroup$
    – Mentalist
    Oct 29 '15 at 12:57

Execute the following command in the terminal, then open a new terminal window and the blender command should work as expected:

echo "alias blender=/Applications/Blender/blender.app/Contents/MacOS/blender" >> ~/.profile

What this command does is add the following line to the end of /Users/SteveW/.profile:

alias blender=/Applications/Blender/blender.app/Contents/MacOS/blender

I strongly recommend to not mess with PATH or any other environment variable for this, it only makes things more complicated, there's no reason to do so when you set up the alias correctly.

On recent versions of macOS, .profile is not used. Use ~/.bash_profile instead.

echo "alias blender=/Applications/Blender/blender.app/Contents/MacOS/blender" >> ~/.bash_profile
  • 1
    $\begingroup$ It WORKS!!! :D You are my hero (indeed a Master), I bow down to you, and thank you very much. I put the PATH, etc. back to the way it was before (because it wasn't woking). $\endgroup$
    – SteveW
    Aug 7 '13 at 0:04
  • 1
    $\begingroup$ Please note: If this command line was to appear on the Manual/Render/Command Line page, it could save some people a whole lot of bother (including: anger, high blood pressure and depression! :) $\endgroup$
    – SteveW
    Aug 7 '13 at 2:18
  • 2
    $\begingroup$ Added on the documentation page now. $\endgroup$
    – brecht
    Aug 7 '13 at 14:04
  • 1
    $\begingroup$ On Mavericks, with Blender 2.69 and with iTerm I used this: echo "alias blender=/Applications/blender.app/Contents/MacOS/blender" >> ~/.bash_profile $\endgroup$
    – Peter Varo
    Dec 29 '13 at 22:07
  • $\begingroup$ I setup an alias on Mavericks, using .bash_profile see coolestguidesontheplanet.com/… Basically, in terminal type nano .bash_profile, add the blender path like this: alias blender='/Applications/Blender2.74/blender.app/Contents/MacOS/blender' and write out the file. $\endgroup$ Jun 1 '15 at 3:19

Now that you have the PATH set, it's actually now working. But you have a new issue:

Warning! bundled python not found and is expected on this platform.

As pointed towards in stacker's answer, you can tell Blender where it is by setting:

setenv BLENDER_SYSTEM_PYTHON /Applications/Blender/blender.app/Contents/MacOS/2.68/python

I suspect after that you may also need to set:

setenv BLENDER_SYSTEM_SCRIPTS /Applications/Blender/blender.app/Contents/MacOS/2.68/scripts
setenv BLENDER_SYSTEM_DATAFILES /Applications/Blender/blender.app/Contents/MacOS/2.68/datafiles

Note you will need to bump the version numbers in the above paths for future versions of Blender.

An easier option to all this may be to just create an alias to open like so:

alias blender="open /Applications/Blender/blender.app --args"

I'm not a OS X user so have not tested the above.

  • $\begingroup$ Thanks for all the effort, and apologies for any unpleasantness. Your answer was getting close but brecht hit the nail on the head. $\endgroup$
    – SteveW
    Aug 7 '13 at 0:04
  • $\begingroup$ This worked perfectly for me in OSX (changing your setenv to export/equals) I joined the Blender community just so I could thumbs this up :) $\endgroup$
    – Aaron R.
    Dec 30 '15 at 6:32

The error 'command not found' means that the command is not found in the $PATH environment variable.

If you installed blender as described in the Wiki Installing Blender on Mac. The executable blender is located in /Applications/Blender/blender.app/Contents/MacOS

You could simply open your terminal and enter

cd /Applications/Blender/blender.app/Contents/MacOS

ndof: 3Dx driver not found
found bundled python: /Applications/Blender/blender.app/Contents/MacOS/2.68/python

In order to run blender from any other location you would need to follow the instructions from DirectoryLayout Configuration & Data Paths

More Environment Variables

Run ./blender --help

Environment Variables:
  $BLENDER_USER_CONFIG      Directory for user configuration files.
  $BLENDER_USER_SCRIPTS     Directory for user scripts.
  $BLENDER_SYSTEM_SCRIPTS   Directory for system wide scripts.
  Directory for user data files (icons, translations, ..).
  $BLENDER_SYSTEM_DATAFILES Directory for system wide data files.
  $BLENDER_SYSTEM_PYTHON    Directory for system python libraries.
  $TMP or $TMPDIR           Store temporary files here.
  $SDL_AUDIODRIVER          LibSDL audio driver - alsa, esd, dma.
  $PYTHONHOME               Path to the python directory, eg. /usr/lib/python.
  • $\begingroup$ Thanks for this, I was able to open Blender from Terminal without the '/Contents/MacOS' previously, and I didn't know it was necessary, to get better results - it's all too complicated! :) $\endgroup$
    – SteveW
    Aug 1 '13 at 22:05
  • $\begingroup$ @Greg Zaal Thanks for your edit, I rolled back since simply adding the install directory to the $PATH doesn't work, there are more changes required. I got some more errors about python not found and so on. I hoped an experienced Mac user could clarify this. $\endgroup$
    – stacker
    Aug 2 '13 at 9:49
  • $\begingroup$ You can also use the Mac specific open command: open -a "Blender" to open from the command line. $\endgroup$
    – CharlesL
    Aug 3 '13 at 12:30
  • $\begingroup$ @CharlesL,I mentioned in a comment above, that I've had no problem opening Blender from Terminal (the command line interface on a Mac). But thanks anyway. $\endgroup$
    – SteveW
    Aug 4 '13 at 2:13
  • $\begingroup$ the link for DirectoryLayout Configuration & Data Paths is dead (observed 2019.07.27) $\endgroup$ Jul 27 '19 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.