.. _section_python_windows_virtualenv:

Virtual Environment Installation
------------------------------------------------------------------------

Assuming you have `virtualenv <http://www.virtualenv.org/en/latest/>`_ and
`virtualenvwrapper <http://virtualenvwrapper.readthedocs.org/en/latest/>`_,
the **OpenEye Python Toolkits** can be installed by the following steps:

#. First create a new virtual environment::

      $ mkvirtualenv oepython

#. Pip install **OpenEye Python Toolkits** into the new environment::


      (oepython) $ pip install -i https://pypi.anaconda.org/OpenEye/simple OpenEye-toolkits


Or you can also pip install from a tarball downloaded from http://www.eyesopen.com/downloads::

      (oepython) $ pip install OpenEye-toolkits-python3-linux-x64-|pypkgversion|.tar.gz

#. Run the **OpenEye** example `oecheminfo.py` to verify the
   **OpenEye Python Toolkits** have been successfully installed::

      (oepython) $ oecheminfo.py
      Installed OEChem version: |oechemversion| platform: linux-g++4.x-x64 built: |builddate|
      ...

.. warning::

   Setting the environment variable ``PYTHONPATH`` will override the path
   to the Python modules installed in a virtual environment.
   Make sure ``PYTHONPATH`` is **not** set when using a virtual environment.

.. seealso::

  :ref:`section_python_test_linux` section for post-installation testing of the
  **OpenEye Python Toolkits**

.. hint::

   When installing different versions of the toolkit (platform specific vs.
   single build) in different conda environments, ``pip`` might try to
   install the Python packages from the cache.  In order to avoid this
   problem, use the ``--no-cache-dir`` option.
