Not able to install RPA Library in Robot framework

Hey Everybody, am trying to install the rpaframework library in my robot framework file, but when I am trying to run it via the command, pip install rpaframework

getting the below error

× Building wheel for pendulum (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [27 lines of output]
Traceback (most recent call last):
File “C:\Users\NithinRajkumar\AppData\Local\Temp\pip-install-l9wktrea\pendulum_0e954d79ed0a4c40a69b9430547f0685\build.py”, line 5, in
from distutils.command.build_ext import build_ext
ModuleNotFoundError: No module named ‘distutils’

I checked in google and ask some AI tools as well, still not able to resolve the issue

you are probably missing setuptools package.

python -mpip install setuptools might fix that.

Setuptools is already installed and wheel as well, but still getting the same error

I think, I had that too, once. It was a python or pip version issue:

What python and pip version are you using?

Python version : Python 3.12.1
pip 24.0 is the version am using

I’ve experienced this problem too. RPALib currently does not support Python 3.12.x, because of some removed dependencies. Even if you install missing dependencies manually, RPALib setup will fail. Currently, the only solution is to use Python 3.11.8 or lower.

2 Likes

Took a look and issue seems to be like this;

rpaframework depends on a package called pendulum version ^2.1.12. This package has been released 4 years ago and has wheels only up to python 3.9 – and source could ofcourse be built still with python 3.11 (cuz distutils) hasnt been removed yet.

Latest pendulum (3.0.0) does however ship a wheel for 3.12 python for most platforms so the point where this can be fixed is within rpaframework package itself. All this information is mentioned in issue here; Cannot install rpaframework - python 3.12 · Issue #1155 · robocorp/rpaframework · GitHub

Mika Hänninen also stated in that ticket that since 3.12 support for quite a bit of packages is still “under way”, they don’t officially support 3.12 either and since Robocorp has stated that they will stop supporting robotframework - getting this fixed might take a while.

So, as @PavelK said, downgrading to 3.11.X is probably the best bet if one is not familiar on how to to start fixing issues like this…

2 Likes

Now this is interesting. Isn’t the Robocorp an essential part of RobotFramework? I’m now only starting with RobotFramework, but this revelation raises a lot of questions. How I understand it, if one wants to use Robocorp’s libs, it’s probably wiser to forget about RobotFramework and go fully Python & RPA Framework integration?

1 Like

Im quite sure this was posted here on some other threads too but here’s the announcement from February by Robocorp: Embracing Python for Automation-as-Code - Robocorp

Robocorp has never been nothing but a member of robot framework foundation and as far as i know, they are not a member anymore. They did sponsor some features to RF core itself and made/sponsored the initial LSP. Imho, while they did good things, i personally wouldnt consider them as “essential part” of the ecosystem…

2 Likes

Anyhuu;

 pip install  "git+https://github.com/rasjani/rpaframework.git#egg=rpaframework&subdirectory=packages/main"

This installs rpaframework just fine on 3.12 … Im not going to publish that into pypi for obvious reasons but if you have urgent need to run on python 3.12 - tried on 3.12.2 just now.

I’ve used Robot Framework for many years and never needed Robocorp’s libraries. There are so many libraries available, and it depends what you need to do.

Also many of Robocorp’s libraries are actually based on other existing libraries or duplicate functionality of other libraries, eg RPA.Browser.Selenium can be replaced with SeleniumLibrary, if you are using an RPA library and want to know what a suitable non RPA library is just ask here in the forum and someone will help.

There is a plan to migrate some of Robocorp’s libraries to MarketSquare and keep them available, the work is currently being do to asses which ones should be migrated and who’ll maintain them.

Robot Framework offers a lot of useful functionality to a software tester that isn’t available in python alone (e.g. the reporting, test case readability, etc, etc), if you goal is simply automate “x” and not care about the result then yes maybe it “wiser to forget about RobotFramework and go fully Python”, but if your goal is the test “x” actually works correctly, and be able to prove it, then it’s probably wiser to stay with robot framework.

Hope that helps,

Dave.

3 Likes

Hi Dave,

Thank you for a detailed insight. Honestly, I’m coming from other test automation tools (Ranorex and TestComplete) and the only reason why I started with RobotFramework, is to find out, how useful it may be in comparison with these closed-source tools. So far, I’m somewhat confused about dependencies, so many libs and duplicated functionality in various libs :slight_smile: Something I don’t have to care about in “one-tool-does-it-all” solution :smile: But I will definitely give it few more days.

Hi Pavel,

I’ll try to give a bit of explanation.

Robot Framework is a basic test framework not an all in one tool, it has only a few builtin keywords, it then uses libraries to expand it’s capabilities for testing various apps, you only load the libraries you need for the test.

What the framework provides is a standardised syntax and way of writing readable test cases and standard report format, as well as some standard api’s that allow people to build useful tools that expand the capabilities of robot framework, because of this people who build tools like ide plugins or test parallelisation tools (e.g pabot) can build these tools knowing if a new library comes along it will generally work with their tool.

This is somewhat like how programming languages have import statements to import modules / function libraries / name spaces

The beauty of this design for an open source test tool is anyone can create / contribute / maintain a library rather than having to wait for the test tool vendor to do it like you do with closed source test tools. Because of this robot framework supports many many more protocols and applications than any other test tool I’ve seen, but if there isn’t a library for a thing you want to test you can easily create one.

  • The keywords that are always available in robot framework are documented in BuiltIn
  • The Standard libraries are installed as part of robot framework when you install it, so these don’t need to be installed but need to be “imported” in the *** settings *** section if you want to use them
  • All other libraries are “third party” in that they were created by and are maintained by someone else, there’s a good list of them in the Resources section of the robot framework page, but if you don’t find what you want there you can search “robotframework xxxxx” in your favourite search engine and you’ll often find what you need (or ask here)

If you spend the time to look through the various libraries available you’ll see the robot framework + the Libraries + tools gives you far more test coverage and capability than any other test tool (open source or commercial). I’ve found the “one-tool-does-it-all” solutions are more like “one-tool-does-some” and if the thing you need isn’t included you end up with many tools and then reporting results becomes a mess.

Naturally I’ll have to admit some bias :wink: but what I mentioned above is what made me fall in love with robot framework.

Hope that helps,

Dave.

2 Likes