|Deletions are marked like this.||Additions are marked like this.|
|Line 29:||Line 29:|
|python -m emen2.db.admin -h $HOME/testdb||python -m emen2.db.load --new -h $HOME/testdb|
|Line 34:||Line 34:|
|You can also quickly access the native Python API, by invoking the emen2.db.admin module and interactive mode.||You can also quickly access the native Python API, by running the module with the '-i' flag.|
|Line 37:||Line 37:|
|python -i -m emen2.db.admin||python -i -m emen2.db.__main__ -h $HOME/testdb|
Installing and configuring EMEN2
EMEN2 has a number of dependencies, which are described on the EMEN2 dependencies page. However, because EMEN2 is often used with EMAN2, we have packaged all of the EMEN2 dependencies along with binary builds of EMAN2, which greatly simplifies installation. See the installation note below.
EMEN2 can be installed using either Python easy_install:
sudo python -m easy_install emen2
Or by downloading the source, unpacking, and using Python distutils:
python ./setup.py build sudo python ./setup.py install
Note: Installing EMEN2 with EMAN2
If you are using an EMAN2 binary distribution to take care of all the dependencies, you will need to use EMAN2's Python environment on Linux and Windows. On Linux, assuming you installed EMAN2 into your home folder, you would use ~/EMAN2/Python/bin/python as the interpreter. This will ensure that the correct dependencies are loaded and EMEN2 is installed in the correct location. On Mac OS X, EMAN2 uses the system default Python environment, so no special action is required.
Here is a "quick start" guide to install EMEN2, initialize an EMEN2 DB, and start the web server. The "-h" argument in the scripts below are references to a directory to keep the EMEN2 DB; the directory will be created if it does not exist.
python -m emen2.db.load --new -h $HOME/testdb
This will prompt for a "root" email address and password, and create a minimal EMEN2 environment. The email address will be used for password recovery and system messages if a mail server is provided in the configuration. The password can be left empty, but the system will not be secure at all.
You can also quickly access the native Python API, by running the module with the '-i' flag.
python -i -m emen2.db.__main__ -h $HOME/testdb
To start the EMEN2 web server with default settings:
python -m emen2.web.server -h $HOME/testdb
You will be able to access the server at http://localhost:8080
Optional: EMEN2 Cryo-EM Schema
To load the Experimental Protocols and Experimental Parameters that we use for our Cryo-EM system, you can download a current schema dump.
tar -xvzf emen2-ncmidb.tar.gz python -m emen2.db.load emen2-ncmidb
Note: You can use the "EMEN2DBHOME" environment variable to avoid specifying "-h path" for each command.
Note: If you are using Python 2.7, you can use "-m emen2.web" and "-m emen2.db"