A bit of extra info here.
The Python activities are invoked regardless of context, using only the Windows environment variables. If, for some reason, a certain path is not set or if a certain Python package is only available in a certain environment (e.g. in the Miniconda console you used to install a certain version of Python), then the script execution will fail.
As a simple verification, you should be able to run the script using nothing but the Windows Command Prompt.
<path to python.exe> <path to script.py>
If that doesn’t work, the Python activities won’t, either. You will surely see an error message of what doesn’t work. Your Python dedicated consoles (like Pycharm or Anaconda) have a lot of internal setup already performed, which the UiPath activities simply don’t have a way to do.
In this particular case, the dependent library was not available outside of the Python environment, which is why the Load Python Script activity failed.