Quantcast
Channel: Ubuntu Forums - Virtualisation
Viewing all articles
Browse latest Browse all 4211

[ubuntu] Cannot Install Python Package Using PIP inside LXD or LXC, permission denied

$
0
0
Hi Everyone.

I have installed LXD or LXC on Ubuntu 22.04. Then, I created an Ubuntu 18.04 container and then named it ros-melodic.

ckusumadewa@vector:~$ lxc list
+-------------+---------+------+------+-----------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+-------------+---------+------+------+-----------+-----------+
| ros-melodic | STOPPED | | | CONTAINER | 0 |
+-------------+---------+------+------+-----------+-----------+

Then, I can start the 'ros-melodic' container and login as the 'ubuntu' user as follows:

ckusumadewa@vector:~$ lxc start ros-melodic
ckusumadewa@vector:~$ lxc ubuntu ros-melodic
ubuntu@ros-melodic:~$

However, inside ros-melodic, I cannot install any python packages using pip, even when I add --user option. I got the following error:

ubuntu@ros-melodic:~$ pip install --upgrade --user pip

OSError: [Errno 13] Permission denied: '/home/ubuntu/.local/lib'

ubuntu@ros-melodic:~$ pip install --user scikit-learn

OSError: [Errno 13] Permission denied: '/home/ubuntu/.local/lib'

What should I do to solve this problem. Any helps will be apreciated. Thank you.



Chandra

Viewing all articles
Browse latest Browse all 4211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>