'pip install numpy' creates directories with wrong permissions

Asked by Cristian Barbarosie

The command 'sudo pip install numpy' creates directories numpy, numpy-1.24.3.dist-info and numpy.libs under /usr/local/lib/python3.8/dist-packages/
All these directories and files therein are read-protected for regular users, so those users cannot use numpy.
Previous (older) installations of other python packages did not have this problem.
On another computer with ubuntu 22.04, pip creates files and directories with read permission for everybody and numpy works OK.

Should I report this as a bug ?

== Architecture =================================
amd64
== DistroRelease =================================
Ubuntu 20.04
== InstallationDate =================================
Installed on 2021-04-10 (759 days ago)
== Tags =================================
 focal
== Uname =================================
Linux 5.15.0-69-generic x86_64
== pip -V =================================
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Don't install numpy with pip, but use the Ubuntu-provided package.

sudo apt install python3-numpy

Can you help with this problem?

Provide an answer of your own, or ask Cristian Barbarosie for more information if necessary.

To post a message you must log in.