How to choose an exOS interpreter and environment?

Hi @mar ,

This behavior comes from the fact that you have installed numpy for your user, and the exOS services run as root.

A simple means of testing this on the target is to try the command as root or as sudo. meaning either

su
python /path/to/your/script.py

or

sudo python /path/to/your/script.py

should produce the same problem, which gives you a simple means of testing before deploying when using additional libraries.

There are a lot of references on the web to solve this, whereas the general recommendation is to use virtual environments.

The simplest way, although not generally recommended (because it can create version conflicts between packages used by different users) is to install the numpy system wide. If you are “alone” on your target (which I assume), then you can go with:

su
pip install numpy

or

sudo pip install numpy

Again, theres a lot of public information in this topic, and several ways to solve this properly, which I would recommend digging deeper into.

If you are new to exOS, please have a look at the getting started:

happy coding

2 Likes