Installation guide

The nanoOCM Python API is distributed by PhotonPath as a Python Wheel file (.whl file). This guide explains how to install the Python Wheel file using the pip package manager.

For a more comprehensive guide on installing Python packages, please refer to the official Python Packaging User Guide.

Requirements

  • Python 3.6 or later

  • pip package manager (usually included with Python)

Install library

1. Open a terminal window:

Open a Command Prompt on Windows, or a Terminal on macOS/Linux. If you work with IDEs like Visual Studio Code or PyCharm, you can use their built-in terminals. Caution: do not use the Python interactive shell, as the pip command will not work there.

2. Choose target environment:

There are two main options for installing the wheel file:

  • Global Python environment: This installs the library for all your Python projects.

  • Virtual Python environment (recommended): This installs the library for a specific project, keeping it separate from other projects.

If you want to install the library globally, proceed to step 3.

If you want to install it in a virtual environment, you need to activate it first. This is usually done with the following commands:

  • source venv/bin/activate on Linux/macOS

  • venv\Scripts\activate on Windows

If you are using the terminal withing an IDE, the environment for your current project is usually set automatically when you open the terminal.

3. Navigate to the directory of the wheel file:

Use the cd command to change the current directory to the location where you downloaded the wheel file. For example, if the file is on your desktop and your username is “user_name”, you might type:

cd /Users/user_name/Desktop

4. Install the Wheel:

python -m pip install photonpath.nanoocm.api-x.y.z-py3-none-any.whl

Replace the file name with the actual name of the wheel file you downloaded. The x.y.z part of the file name is the version number, and may be different for your file.