When import xlwings, it goes wrong

I am learning the python activities recently. When the python script include import xlwings, it simply goes wrong.
As long as I comment out the relating code, it works again.

The following would work.

The following would not work.

The following is the Uipath code.
Main.xaml (7.4 KB)

PS: when in python environment, both work.

Please give me a hand, thanks.


Did you ensure that the library is installed for the python targeted by your Python Scope? From the code provided, you’re using a Python 3.9. If you were using another version, replace in the following commands pip3.9 accordingly (for example, pip3.6 for python 3.6)

In the environment where the process is executed, type the [Windows + R] key combination then type



then [Enter] (or click on OK). In that window, type

pip3.9 install -U xlwings


If the installation fails and you see talking about user --user, try the following, given you’re logged as the user that will execute UiPath process:

pip3.9 install -U xlwings --user

I have installed the xlwings in Python39.

However when I tried your recommendation.

It turned out this way.
Translation: ‘pip39’ is neither an internal nor external command, it is not a available programme or bat file.

Hi, you forgot the dot between the 3 and the 9.

Please type pip3.9 instead of pip39; you can just copy/paste from my previous post