Download the distribution from http://www.eyesopen.com/downloads.
You must download the executable which matches your Python version and your preferred installation mechanism. The following are the available file types and where their associated installation instructions can be found later in this document:
Users are discouraged from installing packages into your global Python installation, known as site-packages. The recommended way to install any Python packages is using virtual environments.
virtualenv creates safe, isolated python environments in user space, also alleviating the need for administrative access to install python packages.
Assuming you have virtualenv installed the following commands run in cmd.exe will create a new virtualenv called oepython and install the OpenEye Python Toolkits into it.
C:\Users\myself> C:\Python27\Scripts\virtualenv.exe oepython ... C:\Users\myself> oepython\Scripts\activate.bat (oepython) C:\Users\myself> pip install OpenEye-python2.7-win32-2017.6.1.zip ... (oepython) C:\Users\myself> oecheminfo.py Installed OEChem version: 2.1.2 platform: microsoft-win32-msvc9-x86 built: 20170617 ... (oepython) C:\Users\myself> deactivate C:\Users\myself>
The examples that are included with the OpenEye Python Toolkits will be installed into the virtual environment’s Scripts directory so that they can be run from an activated virtual environment. The above example executes the oecheminfo.py example script to print out some basic information as a way to test whether installation completed successfully.
PowerShell can be used with virtual environments as well. Use the activate.ps1 script instead to activate the virtual environment. To force the OpenEye examples in the Scripts directory to send their output to the PowerShell window, type the following into the PowerShell prompt:
PS C:\Users\myself> $env:PATHEXT += ";.py"
Double-click the downloaded installer and follow the install wizard to complete the installation. When asked to select the destination of the installation, choose the location of the Python installation (e.g. C:\Python27). The toolkit Python interfaces and libraries will be placed inside the Python directory (e.g. C:\Python27\Lib\site-packages\openeye).
Add the OE_LICENSE environment variable to point to the toolkit license. For example, on Windows 7, press the Windows start button, then right-click on “Computer”, choose “Properties” from the menu that pops up, then click on “Advanced system settings”. On the next window that pops up, click on the “Advanced” tab (if not already selected) and click on the “Environment Variables...” button. Another window will appear, and in the bottom “System variables” section, click on the “New...” button. In the “Edit System Variable” dialog that appears, enter “OE_LICENSE” in the “Variable name” field and then enter the path to your license file in the “Variable value” field (e.g. “C:\oe_license.txt”). Then click the “OK” buttons to close all the opened system settings windows and to force the new setting to take effect.
All the toolkit documents and examples are found in the Python directory (e.g. C:\Python27\<VERSION>). From the examples directory on the command line (e.g. cd C:\Python27\<VERSION>\examples), the examples can be run using a command such as python oechem\oecheminfo.py.