Development environment

To start automating processes, you need a software robot development environment. You have multiple options to choose from.

I want to use a ready-made development environment for my robot project

You can start with a setup that takes care of installing all the required software for you by installing Robocorp Lab. Robocorp Lab is an IDE (Integrated Development Environment) for creating software robots. It includes everything you need to get started. Robocorp Lab integrates with Robocorp Cloud, making it easy to iterate your software robot development process.

When you create a new robot project using Robocorp Lab, you do not need to set up and manage your virtual Python environment(s) manually. Robocorp Lab creates a separate Conda environment for each of your robots. This way, the dependencies of your robot will not end up polluting your system Python setup.

You can create a new robot in Robocorp Lab right from the welcome screen, and get coding straight away: Create a new robot

I want to set up my robot project development environment manually

If you want full control over your development environment, you can set up and manage your environment(s) manually.

Create a shared root directory for your software robot projects

The idea of the shared root project directory is to make it convenient to set up and activate a single virtual Python environment for all of your robots. With this shared virtual Python environment approach, all of your robots have access to the same (local) dependencies. This way, you don't need to manage a separate Python environment for each of your robots.

The following demonstrates the structure of the shared root project directory setup:

Projects (a shared directory for your robots, using a single virtual Python environment)
├── my-first-robot (a version-controlled directory, such as a Git repository)
├── my-second-robot
├── my-third-robot
└── venv (the virtual Python environment)
    └── lib/python3.7/site-packages
        ├── dependency-1
        ├── dependency-2
        ├── dependency-3
        ...

Note that while this shared virtual Python environment setup is convenient, you will want to use separate environments if your robots require different versions of the dependencies. In that case, it is better to set up and activate a virtual environment separately for each of your robots.

Set up the virtual Python environment

Note that while we demonstrate the use of venv here, you are free to use any virtual environment manager you like.

You need a working Python (version 3) installation. On macOS / Linux, you can open the terminal and try running python3 --version to check if you have the required Python installed. On Windows, you can open the command prompt and try running py --version to check if you have the required Python installed.

Navigate to your shared root projects directory in the terminal or the command prompt. Set up a virtual Python environment by running the following command:

Windows:

py -m venv venv

macOS / Linux:

python3 -m venv venv

Activate the Python virtual environment:

Windows:

venv\Scripts\activate

macOS / Linux:

. venv/bin/activate

Remember to activate your virtual environment when working on your robots. That way, your dependencies will install to that virtual Python environment, and not globally to your system Python libraries.

Conclusion

You have multiple options for setting up a development environment for your software robots. Using Robocorp Lab has the advantage of being convenient. For full manual control, you are free to set up your environment by hand, if you like!

You are now ready to proceed with developing software robots. Good luck on your journey!