Article 5NXC1 Python module via pip3 not readable

Python module via pip3 not readable

by
Turbocapitalist
from LinuxQuestions.org on (#5NXC1)
I'm quite the novice in regards to python and especially in regards to using its modules but am now dabbling in it for a casual weekend project. I generally stay with whatever is in the official Raspberry Pi OS repositories exclusively and have avoided adding anything via pip3 until now.

However now that I have used pip3, I am getting all kinds of problems with scripts old and new. The first problem is that the modules are not usable from normal accounts.

Code:$ ./bmp280-demo-01.py
Traceback (most recent call last):
File "./bmp280-demo-01.py", line 6, in <module>
import board
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 724, in exec_module
File "<frozen importlib._bootstrap_external>", line 859, in get_code
File "<frozen importlib._bootstrap_external>", line 916, in get_data
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.7/dist-packages/board.py'

$ ls -lh /usr/local/lib/python3.7/dist-packages/board.py
-rw-r----- 1 root staff 9.4K Aug 29 11:01 /usr/local/lib/python3.7/dist-packages/board.py

$ sudo bash -c umask
0027How or why do the packages which were installed via pip3 end up not usable by general accounts? I presume the umask is what's wrong. What is the most efficient way to fix that? I hope not by manually applying chmod to all the files and directories.latest?d=yIl2AUoC8zA latest?i=xUTAef1XLsA:uhCkHO-nmqk:F7zBnMy latest?i=xUTAef1XLsA:uhCkHO-nmqk:V_sGLiP latest?d=qj6IDK7rITs latest?i=xUTAef1XLsA:uhCkHO-nmqk:gIN9vFwxUTAef1XLsA
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments