Archive for December 2012
A project I am working on uses nose for unit testing. The default version of nose in the Ubuntu 12.04 repository is not the most current and I am experiencing some issues so I will upgrade.
First, remove old package
sudo apt-get remove python-nose
Download the current version (1.2.1)
tar -xzf nose-1.2.1.tar.gz cd nose-1.2.1/
Following the notes here change line 71 of setup.py from
packages = ['nose', 'nose.ext', 'nose.plugins', 'nose.sphinx'],
packages = ['nose', 'nose.ext', 'nose.plugins', 'nose.sphinx', 'nose.tools'],
Finally, install in the usual way
sudo python setup.py install
pomp (partially-observed Markov processes) is a package in R for simulating stochastic and deterministic mathematical models as well as to infer parameters using observed data — also see the r-forge page. I will provide (very) brief install instructions here and provide examples of use in later posts.
Install by going to the command line and starting R using sudo (I assume you are using Ubuntu here):
Once in R, type:
install.packages('pomp', dep = TRUE)
The pomp package and other packages it requires will be downoaded, compiled, and installed. You can test that pomp is available by loading the package in an R session:
2014/05/13: It has been reported to me that recent attempts to use the install procedure detailed below have had issues. It is certain that IPython has progressed quite a bit since I wrote this post (almost two years ago). If you can’t use the version in the Ubuntu repository, I would suggest using pip and following the install instructions at the IPython website.
In a previous post I described installing IPython using the version in the repository. This installs version 0.12.1, an older release, resulting in compatibility issues with IPython notebooks saved in newer versions. As a result, I will remove the repository version and install the development version on github.
First, remove the repository version:
sudo apt-get remove ipython ipython-notebook
Note, I do not use the additional commands to remove all dependencies (mathjax, tornado, etc.) because these are still needed for the new install.
To install from github, cd to an appropriate directory and run:
git clone https://github.com/ipython/ipython.git cd ipython sudo python setup.py install
Now, test it out by launching a notebook:
ipython notebook --pylab inline
Thus far, everything seems to work and using the git repository allows for me to easily update versions if needed.
I use git version control for many projects. Mostly I use the command line tools to do all of my work but I’d like to find a useful GUI for looking at branches, diffs, etc. My first test will be the version of gitg in the repository.
sudo apt-get install gitg
Seems like a useful tool for browsing repositories, visualizing branches, looking at diffs, staging and committing changes with messages.
I install R using the instructions at cran.r-project.org (direct link to instructions). At the website, click ‘Download R for Linux’ then ‘ubuntu’ to get the most up-to-date instructions. Following these instructions, my process was as follows:
Add the repository, using the CRAN server of your choice (I use UCLA here) and the appropriate Ubuntu version (I use precise for Ubuntu 12.04):
sudo add-apt-repository "deb http://cran.stat.ucla.edu/bin/linux/ubuntu precise/"
For security, get the key and add it to your keyring (NOTE: the CRAN website says that some people are having issues with this step — if the commands here do not work for you, check there for latest information):
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 gpg -a --export E084DAB9 | sudo apt-key add -
Next, update and install (the documentation says you might want to install r-base-dev as well, but I found this package is already included using the commands below):
sudo apt-get update sudo apt-get install r-base
To install package not in the base set, use the following commands
Now, inside R, install package packagename with
install.packages('packagename', dep = TRUE)
Note — the quotes around the packagename ARE needed.
Again, start R with sudo:
Now, inside R, update packages with
update.packages(ask = FALSE)
- Download the debian package from http://www.rstudio.org
- I downloaded RStudio 0.97.237 – Debian 6+/Ubuntu 10.04+ (64-bit) — this is actually a file: rstudio-0.97.237-amd64.deb
- If all dependencies are installed (output will complain if not), install rstudio-0.97.237-amd64.deb file using
sudo dpkg -i rstudio-0.97.237-amd64.deb
I got a complaint about libjpeg62 and installed is using:
sudo apt-get install libjpeg62
followed by the installation of the deb file, as shown above.