Maya and Mac os using different version of SVN
While writing some tools for Maya to perform SVN operations, I found that they were erring out. To investigate the problem I ran a simple test in Mac Terminal and Maya.
Mac terminal :
$ svn --version
Output : svn, version 1.8.13 (r1667537)
Maya :
import subprocess
command = "svn --version"
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, universal_newlines=True)
out, err = process.communicate()
print out,err
Output : svn, version 1.7.10 (r1665045)
Problem : Clearly my Mac Os and Maya were using different SVN.
On executing command: "which svn"
Terminal gave = /usr/bin/svn
Maya gave = usr/local/bin/svn
After spending allot of time, I was not able to figure out how to point maya to use usr/local/bin/softwares.
I tried modifying
- /etc/paths file (which is $PATH),
- /Users/username/.bash_profile
My Solution:
1. Install svn using brew : $brew install svn
When installation in done terminal gave me a path of where svn is installed, which was :
Mac terminal :
$ svn --version
Output : svn, version 1.8.13 (r1667537)
Maya :
import subprocess
command = "svn --version"
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, universal_newlines=True)
out, err = process.communicate()
print out,err
Output : svn, version 1.7.10 (r1665045)
Problem : Clearly my Mac Os and Maya were using different SVN.
On executing command: "which svn"
Terminal gave = /usr/bin/svn
Maya gave = usr/local/bin/svn
After spending allot of time, I was not able to figure out how to point maya to use usr/local/bin/softwares.
I tried modifying
- /etc/paths file (which is $PATH),
- /Users/username/.bash_profile
My Solution:
1. Install svn using brew : $brew install svn
When installation in done terminal gave me a path of where svn is installed, which was :
/usr/local/Cellar/subversion/1.8.13/bin/
2. Copy installed svn files to "usr/bin" (system files) : This will ask you admin password as you are modifying system files.
2. Copy installed svn files to "usr/bin" (system files) : This will ask you admin password as you are modifying system files.
Once its done Maya started reading 1.8 version and to make sure terminal also uses the same version, in path file always define : usr/local/bin after usr/bin so that everything from usr/bin is read first.
eg :
export PATH=/usr/bin:/usr/local/bin:/usr/local/sbin:~/bin:$PATH
Comments