0

I'm following these instructions to install CUDA on my Mac and need some help concerning path variables.

I already installed the package but need to set up the required environment variables:

export PATH=/Developer/NVIDIA/CUDA-6.0/bin:$PATH
export DYLD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-6.0/lib:$DYLD_LIBRARY_PATH

I just followed the instructions from this site to set the environment variables but seemingly it doesn't work that way.

I mean does the folder containing my environment.plist file need to be in a specific directory? I just installed it to my home directory. Also I put in my plist file in the ROOT column the name of the variable (f.ex. PATH) and in the Value column I typed in the exact string which is specified above behind the "="-sign (f.ex. /Developer/NVIDIA/CUDA-6.0/bin:$PATH).

  • In which step of the NVDIA instructions are you stuck, 3.2? Which parts of 3.2 have been done, which failed? – nohillside May 14 '14 at 15:04
  • Hey thanks for the reply but by that time I worked out another way to do this: first: render invisible files visible, then open the bash_profile in your home directory with any text editor and write down whatever you need to. (If new to this and mac, make sure you understand the systems file structure first and know the meaning of the ':'-sign) – bijchou May 15 '14 at 9:53
  • And don't forget to reload the affected files by typing into the bash 'source /filename', for the changes to take effect. – bijchou May 15 '14 at 10:03
  • Add this as an answer below then! – nohillside May 15 '14 at 10:11
1

This is how it worked for me: 1. Render invisible files visible. 2. Then open the bash_profile in your home directory with any text editor and write down whatever you need to, f.ex.: 'export PATH = /this/is/some/complete/path/name:$PATH' Adding ':$PATH' lets the system search for other pathnames stored somewhere else (so do that only when editing system variables). ':' in general enables you to ad multiple paths. 3. Don't forget to reload the affected files by typing into the bash 'source /filename', for the changes to take effect.

Other problems you might encounter: When defining multiple variables be aware that it parses in order, so if you use f.ex. 'export PATH = $ANOTHERPATH/some/directory' make sure to define ANOTHERPATH before defining PATH.

And make sure you really know your OS's file system.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .