Unable to import robotframework-appiumlibrary even after successful installation in Pycharm

Failed to import AppiumLibrary in Pycharm even after successful installation. I’m using the following:

Python 3.12

Package Version

Appium-Python-Client 4.0.0
attrs 23.1.0
certifi 2023.7.22
cffi 1.16.0
click 8.1.7
colorama 0.4.6
decorator 5.1.1
docutils 0.20.1
grpcio 1.59.3
grpcio-tools 1.59.3
h11 0.14.0
idna 3.4
kitchen 1.2.6
natsort 8.4.0
outcome 1.3.0.post0
overrides 7.4.0
pip 24.0
protobuf 4.25.1
pycparser 2.21
PySocks 1.7.1
pywin32 306
robotframework 6.1.1
robotframework-appiumlibrary 2.0.0
robotframework-assertion-engine 3.0.3
robotframework-browser 18.0.0
robotframework-dependencylibrary 4.0.1
robotframework-pabot 2.16.0
robotframework-pythonlibcore 4.3.0
robotframework-seleniumlibrary 6.1.3
robotframework-stacktrace 0.4.1
selenium 4.12.0
setuptools 68.2.2
six 1.16.0
sniffio 1.3.0
sortedcontainers 2.4.0
trio 0.23.1
trio-websocket 0.11.1
typing_extensions 4.8.0
urllib3 2.1.0
wrapt 1.16.0
wsproto 1.2.0

Hi Gene,

How did you install appiumlibrary? From the command line outside pycharm, or from within pycharm?

The error message is saying appiumlibrary is not installed, so this is likely related to a venv (python virtual environment) where you’ve installed appiumlibrary in one python environment but when you run it’s using another python environment that doesn’t have appiumlibrary.

Sorry I don’t use pycharm, so can’t really guide you on the details.


Hello D,

I installed it via local terminal outside pycharm using pip command. Just now i also tried to install a VSCode but the result is the same. Also I’m not using a venv, I set my interpreter in pycharm to python3.12

Hi Gene,

Not sure about pycharm, some IDE’s create a venv for you, so you might be using one without knowing.

The other thing that can happen is when you install from the command line outside pycharm, but you’ve left pycharm running is that pycharm doesn’t see that change, so the fix may be as simple as closing pycharm and reopening it.

Beyond that, hopefully someone who knows pycharm better than me will chime in and help.


1 Like

@damies13 nah, that message doesnt say that appium ain’t installed, it says AppiumLibrary (rf bindings) cannot import TouchAction from appium itself.

So, next we check what appium is used, looks like pip reports it to be 4.0.0.

On there, following is said;

Quick migration guide from v3 to v4

  • Removal
    • MultiAction and TouchAction are removed. Please use W3C WebDriver actions or mobile: extensions

TouchAction is removed in 4.0.0 release, error is saying that TouchAction cannot be imported so the issue is that AppiumLibrary pulls in too new appium (eg, bug in its dependencies) and its not updated to handle the changes in the upstream…


Install older appium. Something like this might fix your issue;

  python -mpip install --force-reinstall Appium-Python-Client==3.2.1 


Filed a ticket Appium-Python-Client 4.0.0 breaks this package. · Issue #417 · serhatbolsu/robotframework-appiumlibrary · GitHub

And patch that fixes the issue; Fix dependency break (#417) by rasjani · Pull Request #418 · serhatbolsu/robotframework-appiumlibrary · GitHub


@rasjani Fair enough, I didn’t look close enough, I just saw module not found error :blush:


1 Like

Thanks for the inputs. Now I’m able to move forward and encounter new issue. :sweat_smile:

1 Like