Installed package via -pip only works as superuser (docker) #6873
Replies: 1 comment 8 replies
-
You need to do
umask 022
first or the permissions of the files created by root will be 007 so normal
users can't read them.
On Wed, Aug 16, 2023 at 11:08 PM Stephen Melczer ***@***.***> wrote:
I'm been using the (fantastic) cocalc docker container recently and ran
into a strange bug: when installing an external package it works perfectly
under sudo sage but does not work without superuser privileges. My
process was the following
(1) Install cocalc docker on Ubuntu server using
apt install docker.io
docker run --name=cocalc -d -v ~/cocalc:/projects -p 443:443 sagemathinc/cocalc-v2
(2) When docker setup is complete install the ore_algebra package with
sudo docker exec -it cocalc bash
sage -pip install git+https://github.com/mkauers/ore_algebra.git
(3) Go into the cocalc server and open a terminal, then call
sage
from ore_algebra import * # No issues, seems like the package is found
OreAlgebra # One of the functions in the package
This gives NameError: name 'OreAlgebra' is not defined. The same
behaviour happens in a Jupyter notebook. However, giving the project sudo
access and running
sudo sage
from ore_algebra import *
OreAlgebra
finds the OreAlgebra function and behaves correctly!
Any ideas about what could be going wrong? I don't know of another
non-default sage package that can be installed with pip to see if this is
specific to the ore_algebra package, or holds for other external packages
installed with pip.
—
Reply to this email directly, view it on GitHub
<#6873>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJXS5V4B2AKJKNXA5NBJYLXVWYNFANCNFSM6AAAAAA3TRTLCM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
-- William Stein
|
Beta Was this translation helpful? Give feedback.
8 replies
Answer selected by
smelczer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm been using the (fantastic) cocalc docker container recently and ran into a strange bug: when installing an external package it works perfectly under
sudo sage
but does not work without superuser privileges. My process was the following(1) Install cocalc docker on Ubuntu server using
(2) When docker setup is complete install the ore_algebra package with
(3) Go into the cocalc server and open a terminal, then call
This gives
NameError: name 'OreAlgebra' is not defined
. The same behaviour happens in a Jupyter notebook. However, giving the project sudo access and runningfinds the OreAlgebra function and behaves correctly!
Any ideas about what could be going wrong? I don't know of another non-default sage package that can be installed with pip to see if this is specific to the
ore_algebra
package, or holds for other external packages installed with pip.Beta Was this translation helpful? Give feedback.
All reactions