Wiki‎ > ‎

Anaconda conda

posted Feb 27, 2017, 6:57 PM by Danny Xu   [ updated Sep 18, 2017, 12:46 PM ]

ipython in Schrodinger virtual env

alias ipython='python -m IPython' or

alias schipython='source $SCHRODINGER/; python -m IPython'

To install readline to, requires




when ready, run

LDFLAGS="-L/home/xudong/apps/anaconda2/lib/python2.7/config/" pip install readline


One workaround is to create clone environment, and then remove original one:

(remember about deactivating current environment with deactivate on Windows and source deactivate on macOS/Linux)

conda create --name new_name --clone old_name
conda remove --name old_name --all # or its alias: `conda env remove --name old_name`

There are several drawbacks of this method:

  1. it redownloads packages - you can use --offline flag to disable it,
  2. time consumed on copying environment's files,
  3. temporary double disk usage.

To install a specific version and build:

conda install rdkit=2016.03.4=np111py34_1


conda-env now does this automatically (if pip was installed with conda).

You can see how this works by using the export tool used for migrating an environment:

conda env export -n <env-name> > environment.yml

The file will list both conda packages and pip packages:

name: stats
  - javascript
  - python=3.4
  - bokeh=0.9.2
  - numpy=1.9.*
  - nodejs=0.10.*
  - flask
  - pip:
    - Flask-Testing

If you're looking to follow through with exporting the environment, move environment.yml to the new host machine and run:

conda env create -f path/to/environment.yml

If you are trying to import packages from a second environment into the root environment, export package names from the second environment to a yaml file, then update the first environment. Within the second environment, run:

conda env export > environment.yml              
conda env update -n root -f environment.yml     

See conda env for more details.

Suggestion: backup your existing environments (see first command) before attempting changes to root and verify the desired outcome by testing these commands in a demo environment.


For non-conda package, must use pip
pip install <tar.gz>
pip uninstall <package name>

List all of your packages in the active environment:

conda list

To list all of your packages installed into a non-active environment named snowflakes:

conda list -n snowflakes

Note that chemfp, yank, mdanalysis, and prody don’t have win64 version, only linux64 available
To search a package:
conda search packagename

if nothing find

anaconda search -t conda packagename

conda install -c prody_devel prody=1.8.2
Now it seems to work, but I get this warning: The following packages will be DOWNGRADED:
anaconda:    4.0.0-np110py27_0 --> custom-py27_0

y suggestion will be using pip instead of conda.
pip is compatible with anaconda so it will be fine.
conda config --add channels MDAnalysis
conda install mdanalysis
conda update mdanalysis conda install -c omnia mdtraj


1. Download and install Anaconda Python 2.7 version (64 or 32bit) under your apps folder

2. start a local terminal and run the following commands, internet access is needed:

vi ~/.bashrc

#add the following lines to the file

alias llt="ll -trha"
export PATH=~/apps/Anaconda2/envs/omnia_py34env:$PATH: ~/apps/Anaconda2/envs/omnia_py34env/Scripts

#save ~/.bashrc and then type

source ~/.bashrc

#Then run the following commands one-by-one

conda config --add channels omnia
conda create -n omnia_py34env python=3.4
conda install -n omnia_py34env -c omnia pyemma
conda install -n omnia_py34env -c omnia pymbar
conda install -n omnia_py34env -c omnia pdbfixer
conda install -n omnia_py34env -c omnia openmm
conda install -n omnia_py34env -c omnia nose
conda install -n omnia_py34env -c omnia nose-timer
conda install -n omnia_py34env -c omnia msmbuilder
conda install -n omnia_py34env -c omnia mdtraj
conda config --add channels salilab
conda install -n omnia_py34env -c salilab modeller

bash ./
source ~/.bashrc
conda info
conda info -e
conda list|babel
conda list|grep babel
conda list|grep chem
conda list|grep sci
conda list|grep num
conda list|grep plot
anaconda search -t conda chemfp
conda config --add channel r
conda config --add channels r
conda config --add channels bioconda
conda config --add channels omina
conda config --add channels salilab
conda info -e
conda info
conda create -n molfp python
conda config --remove channels omina
conda config --add channels omnia
conda info -e
conda create -n molfp python
source activate molfp
conda info -e
conda searcg rdkit
conda search rdkit
conda search chemfp
conda search babel
conda install chemfp=1.1p1
conda config --remove channels omnia
conda install chemfp=1.1p1

conda config --add channels MDAnalysis
conda info
conda search mdanalysis
conda install mdanalysis
conda list|grep read
anaconda search -t conda mdtraj
conda search mdtraj -c omnia
conda install mdtraj -c omnia
conda config --add channels omnia
conda install mdtraj -c omnia
conda config --add channels prody_devel
conda info
conda install prody
pip install -U ProDy

To install Modeller using the 'conda' package manager, simply run from a command line
conda config --add channels salilab

conda install modeller

conda install -c omnia openmm
Verify your installation by typing the following command:
python -m simtk.testInstallation

Conda vs PIP

If you’ve used pip and virtualenv in the past, you can use conda to perform all of the same operations. Pip is a package manager, and Virtualenv is an environment manager. Conda is both.

Task Conda package and environment manager command Pip package manager command Virtualenv environment manager command
Install a package conda install $PACKAGE_NAME pip install $PACKAGE_NAME X
Update a package conda update --name $ENVIRONMENT_NAME $PACKAGE_NAME pip install --upgrade $PACKAGE_NAME X
Update package manager conda update conda Linux/OSX: pip install -U pip Win: python -m pip install -U pip X
Uninstall a package conda remove --name $ENVIRONMENT_NAME $PACKAGE_NAME pip uninstall $PACKAGE_NAME X
Create an environment conda create --name $ENVIRONMENT_NAME python X cd $ENV_BASE_DIR; virtualenv $ENVIRONMENT_NAME
Activate an environment source activate $ENVIRONMENT_NAME X source $ENV_BASE_DIR/$ENVIRONMENT_NAME/bin/activate
Deactivate an environment source deactivate X deactivate
Search available packages conda search $SEARCH_TERM pip search $SEARCH_TERM X
Install package from specific source conda install --channel $URL $PACKAGE_NAME pip install --index-url $URL $PACKAGE_NAME X
List installed packages conda list --name $ENVIRONMENT_NAME pip list X
Create requirements file conda list --export pip freeze X
List all environments conda info --envs X Install virtualenv wrapper, then lsvirtualenv
Install other package manager conda install pip pip install conda X
Install Python conda install python=x.x X X
Update Python conda update python * X X
  • conda update python updates to the most recent in the series, so Python 2 to latest 2.x, Python 3 to latest 3.x, and so on.