0

I have a Linux machine with Ubuntu rel 20.10, I'm using the robot framework with Eclipse. I have a problem with a Sikulilibrary doesnt'work. I tried to pip install robotframework-SikuliLibrary,

But i have this error

> Exception : Initializing test library Sikulilibrary with no arguments
> failed:Permission error[Errno13]Permission denied

I tried to install Selenium library all is ok,do you have any questions about this issue?

Robotframework 3.2
Python 3.8.6

Thanks a lot

BiOS
  • 2,282
  • 3
  • 10
  • 24
  • Hi Maurizio and welcome to StackOverflow. I have seen that you have not yet accepted an answer. Both myself and Metal3d have answered, if you found those answer helpful you could **upvote** them, and you could also **accept** what you think is the definitive solution to your problem, whilst you could add comments if you think the problem was not solved. Please have a read [here](https://stackoverflow.com/help/someone-answers). Take care! – BiOS Mar 26 '21 at 21:18

2 Answers2

0

Make sure that you are adding the module in the correct Python installation (your Python 3.8 and not the system Python) and that you are installing in your home directory. This way no special permission will be needed.

pip3 install --user robotframework-SikuliLibrary

The above will install the package in the user site-packages directory of the current (running) Python. In my case it is ~/.local/lib/Python3.9/site-packages, which is already in my PATH. It should be the case for you too, so you should be good to go.

Otherwise, if you have problems like ModuleNotFoundError just find your site-packages directory with:

python3 -m site

You will have it under USER_SITE. Take note of it and add it to PATH following help from this question.

Otherwise, like @Metal3D said, you could use a virtual environment

BiOS
  • 2,282
  • 3
  • 10
  • 24
0

pip wants to install the package in your system, and you don't have the right to write here. But... Do NOT use sudo with pip. This will install system-wide and can break your installation or a package can overwrite this one.

Use virtualenv, or pipenv.

E.g. To use virtualenv:

cd your-project
python -mvenv .venv
source .venv/bin/activate
# and then
pip install XXX

You will need to call source .venv/bin/activate anytime you want to work and launch your project. The behavior is to change the installation path to a local path (and not your system).

Or, like said @BIOS in https://stackoverflow.com/a/66785567/1472048 comment, use your "home" installation with "--user" option to install in ~/.local/lib.

Metal3d
  • 2,905
  • 1
  • 23
  • 29