'#' signifies a comment. Don't type it or anything after it.

CMPy requires a very recent version of NetworkX:

$ svn co http://networkx.lanl.gov/svn/networkx/trunk networkx -r 1363
$ cd networkx
$ python setup.py install --user        # python 2.6, ~/.local/lib/python2.6/site-packages/networkx
$ python setup.py install --prefix=~/   # python 2.5, ~/lib/python2.5/site-packages/networkx

If you don't want to install from SVN, you can download the nightly tarball here:

http://networkx.lanl.gov/download/networkx/

Grab the most recent .tar.gz file. Then install as usual. For example,

$ wget http://networkx.lanl.gov/download/networkx/networkx-1.0.dev1317.tar.gz
$ tar -zxvf networkx-1.0.dev1317.tar.gz
$ cd networkx-1.0.dev1317
$ python setup.py install --user        # python 2.6, ~/.local/lib/python2.6/site-packages/networkx
$ python setup.py install --prefix=~/   # python 2.5, ~/lib/python2.5/site-packages/networkx

To obtain CMPy:

$ git clone git://vcs.cse.ucdavis.edu/cmpy.git
$ cd cmpy
$ python setup.py install --user        # python 2.6, ~/.local/lib/python2.6/site-packages/cmpy
$ python setup.py install --prefix=~/   # python 2.5, ~/lib/python2.5/site-packages/cmpy

Try to import:

$ cd
$ python -c "import cmpy"

You might need to set your PYTHONPATH. For example, if your shell is csh:

$ setenv PYTHONPATH ~/lib/python2.5/site-packages

If your shell is bash:

export PYTHONPATH=~/lib/python2.5/site-packages

To make this permanent, add the above line to your shell's configuration file. For csh, it is '.cshrc'. For bash, it is '.bashrc'. Google it.

To update CMPy:

$ cd cmpy
$ git pull
$ python setup.py install --user        # python 2.6, ~/.local/lib/python2.6/site-packages/cmpy
$ python setup.py install --prefix=~/   # python 2.5, ~/lib/python2.5/site-packages/cmpy

Trouble updating?

I had trouble updating and noticed that it was dependent on which wireless server I was using (CSE vs. Math). On Math, I got

$ cd cmpy
$ git pull
fatal: Unable to look up vcs.cse.ucdavis.edu (port 9418) (nodename nor servname provided, or not known)

Switching to CSE fixed this problem.

To update NetworkX:

$ # do this only if CMPy complains that your NetworkX is not new enough
$ cd networkx/trunk
$ svn update
$ python setup.py install --user        # python 2.6, ~/.local/lib/python2.6/site-packages/cmpy
$ python setup.py install --prefix=~/   # python 2.5, ~/lib/python2.5/site-packages/cmpy

To commit changes to the global repo:

$ # do your local edits and your local commits
$ # when you are ready to push upstream...(you must have proper access)
$ git pull
$ git push git@vcs.cse.ucdavis.edu:cmpy.git

To view a web page on recent commits, visit: https://vcs.cse.ucdavis.edu/git/cmpy.git

 
cmpy/home.txt · Last modified: 2009/10/06 17:06
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-No Derivative Works 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki