Setup Linux for development
Gabriel Iltis edited this page Apr 22, 2015
·
5 revisions
Setting up linux for NSLS-II development ----
Check your Linux distribution and release with lsb_release -a
: :
edill@xf23id1-ws3:~/.ssh$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 7.5 (wheezy)
Release: 7.5
Codename: wheezy
Debian 7.5 "Wheezy" ====
- Use anaconda to manage python libraries
-
Download anaconda
- I downloaded Anaconda with version=2.0.1-Linux-x86_64
-
Install anaconda into your home directory: :
bash Anaconda-[version].sh
-
Check that your python version is running from ~/anaconda/bin/python :
edill@xf23id1-ws3:~$ which python /home/edill/anaconda/bin/
- If which python does not return
/home/username/anaconda/bin/
, do not go to the next step until it does!!
-
Download anaconda
-
If you're working at any of the computers at the beamlines, you'll need to export the http_proxy environmental variable which will allow you to use
conda search
,conda install
, etc... :export http_proxy=http://proxy:8888 export https_proxy=http://proxy:8888
- Compare the library versions that anaconda installed with our library dependencies located here
-
Set up development folder tree. Suggestion: :
~/dev ∟ my_src/ ∟ NSLS2 ∟ vistools ∟ python_src/ ∟ VisTrails ∟ matplotlib ∟ metadataStore
-
Get NSLS-II source code
- Fastest way is to run this script in the directory where you want the git repositories cloned
- install the packages (
vistools
andNSLS2
):- cd to the top-level directory of each package
python setup.py develop
This will set up the installed version of the package to track the code as you edit it. Using this
nosetest
will automatically find the correct version of the code. In a live interpreter you will need to callreload
. - Get VisTrails source code
cd ~/dev/my_src/
git clone https://github.com/VisTrails/VisTrails.git
- Run VisTrails
- Set up VisTrails to develop modules
- make a git repository called 'userpackages'
- git clone it into ~/dev/my_src/
- delete or move ~/.vistrails/userpackages/ to ~/dev/my_src/userpackages/
- make a symbolic link between ~/dev/my_src/userpackages/ and ~/dev/my_src/VTTools/vt_config/NSLS-II
ln -s ~/dev/my_src/VTTools/vt_config/NSLS-II
- go to the ~/.vistrails/ directory
cd ~/.vistrails/
- make a symbolic link between ~/.vistrails/userpackages/ and ~/dev/my_src/userpackages/
ln -s ~/dev/my_src/userpackages/ userpackages
- Get the latest version of matplotlib
- go to ~/dev/other_src/
git clone https://github.com/matplotlib/matplotlib.git
pip uninstall matplotlib
pip install ./matplotlib
- If the pip install fails, try
sudo apt-get build-dep python-matplotlib
first and then run the pip install again
- If you want to play around with the data broker: Set up the Data Broker