m.roth at 5-cent.us
2018-Apr-06 16:25 UTC
[CentOS] Semi-OT: install python package in userspace
CentOS 7 box. As there's no package in any of the repos, we're trying to install scikit-learn in the user's space. It refuses. My late try was, after d/l a .whl from last year, hoping that would work with the numpy package in the regular repos, I did a pip install --user scikit-learn..., and it still seems to want to write to system space: OSError: [Errno 13] Permission denied: '/usr/lib64/python2.7/site-packages/numpy-1.7.1.dist-info Anyone got any pointers? mark
Valeri Galtsev
2018-Apr-06 16:40 UTC
[CentOS] Semi-OT: install python package in userspace
On Fri, April 6, 2018 11:25 am, m.roth at 5-cent.us wrote:> CentOS 7 box. As there's no package in any of the repos, we're trying to > install scikit-learn in the user's space. It refuses. My late try was, > after d/l a .whl from last year, hoping that would work with the numpy > package in the regular repos, I did a pip install --user scikit-learn..., > and it still seems to want to write to system space: OSError: [Errno 13] > Permission denied: > '/usr/lib64/python2.7/site-packages/numpy-1.7.1.dist-info > > Anyone got any pointers?I would take a look at the dependencies it is trying to install and will install them first one at a time into userspace. It looks that --user flag is not being passed to the installation of dependencies. Valeri> > mark > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >++++++++++++++++++++++++++++++++++++++++ Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247 ++++++++++++++++++++++++++++++++++++++++
Richard Demeny
2018-Apr-06 16:42 UTC
[CentOS] Semi-OT: install python package in userspace
Just sudo it On Fri, 6 Apr 2018 17:25 , <m.roth at 5-cent.us> wrote:> CentOS 7 box. As there's no package in any of the repos, we're trying to > install scikit-learn in the user's space. It refuses. My late try was, > after d/l a .whl from last year, hoping that would work with the numpy > package in the regular repos, I did a pip install --user scikit-learn..., > and it still seems to want to write to system space: OSError: [Errno 13] > Permission denied: > '/usr/lib64/python2.7/site-packages/numpy-1.7.1.dist-info > > Anyone got any pointers? > > mark > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >
Valeri Galtsev
2018-Apr-06 16:50 UTC
[CentOS] Semi-OT: install python package in userspace
On Fri, April 6, 2018 11:42 am, Richard Demeny wrote:> Just sudo itThis is exactly why I have big reservation in giving users sudo permissions. If they need sudo on UNIX or Linux for small thing like this, then they have no idea what they are doing and can easily screw the system up. Not to mention regular user should not hahe these permissions on multi-user system. If they know enough to not screw system up, they do not need almighty permissions and are able to install what they need into userspace. The last is the goal of the OP. Valeri> > On Fri, 6 Apr 2018 17:25 , <m.roth at 5-cent.us> wrote: > >> CentOS 7 box. As there's no package in any of the repos, we're trying to >> install scikit-learn in the user's space. It refuses. My late try was, >> after d/l a .whl from last year, hoping that would work with the numpy >> package in the regular repos, I did a pip install --user >> scikit-learn..., >> and it still seems to want to write to system space: OSError: [Errno 13] >> Permission denied: >> '/usr/lib64/python2.7/site-packages/numpy-1.7.1.dist-info >> >> Anyone got any pointers? >> >> mark >> >> _______________________________________________ >> CentOS mailing list >> CentOS at centos.org >> https://lists.centos.org/mailman/listinfo/centos >> > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >++++++++++++++++++++++++++++++++++++++++ Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247 ++++++++++++++++++++++++++++++++++++++++
m.roth at 5-cent.us
2018-Apr-06 16:53 UTC
[CentOS] Semi-OT: install python package in userspace
Richard Demeny wrote:> Just sudo it > > On Fri, 6 Apr 2018 17:25 , <m.roth at 5-cent.us> wrote: > >> CentOS 7 box. As there's no package in any of the repos, we're trying to >> install scikit-learn in the user's space. It refuses. My late try was, >> after d/l a .whl from last year, hoping that would work with the numpy >> package in the regular repos, I did a pip install --user >> scikit-learn..., >> and it still seems to want to write to system space: OSError: [Errno 13] >> Permission denied: >> '/usr/lib64/python2.7/site-packages/numpy-1.7.1.dist-info >> >> Anyone got any pointers? >>First, this is a mailing list, not Outlook. Please don't top post. Second, No. You do not appear to understand the issues. I am *NOT* installing it as root. This is my manager's approach, and I agree with it. As it's not a package, in a std. repo, it would not be updated for bugfixes, and, far more critically, security fixes, when we do that every month. That's why we want it installed in the user's space. These are servers, used by many researchers, not someone's home Linux box. And even at home, I wouldn't install it that way. And I want him to use the system numpy, not install a newer one, that would also have the same update issues. Btw, numpy in the std. repos hasn't been seen a package update since 2015, which is why I'm trying to install a scikit-learn from last year.... mark
Kenneth Porter
2018-Apr-06 17:49 UTC
[CentOS] Semi-OT: install python package in userspace
--On Friday, April 06, 2018 1:25 PM -0400 m.roth at 5-cent.us wrote:> Anyone got any pointers?Not a Python programmer but a quick google turned up some likely-looking resources: <https://github.com/pypa/pip/issues/1668> <https://bugzilla.redhat.com/show_bug.cgi?id=662034#c10> My google search: python pip user writes to site-packages
On 06.04.2018 18:25, m.roth at 5-cent.us wrote:> CentOS 7 box. As there's no package in any of the repos, we're trying to > install scikit-learn in the user's space. It refuses. My late try was, > after d/l a .whl from last year, hoping that would work with the numpy > package in the regular repos, I did a pip install --user scikit-learn..., > and it still seems to want to write to system space: OSError: [Errno 13] > Permission denied: > '/usr/lib64/python2.7/site-packages/numpy-1.7.1.dist-infocan't reproduce your issue: [ulf at centos7-x1 ~]$ pip install --user scikit-learn Collecting scikit-learn Downloading scikit_learn-0.19.1-cp27-cp27mu-manylinux1_x86_64.whl (12.2MB) 100% |????????????????????????????????| 12.2MB 101kB/s Installing collected packages: scikit-learn Successfully installed scikit-learn-0.19.1 You are using pip version 8.1.2, however version 9.0.3 is available. You should consider upgrading via the 'pip install --upgrade pip' command. But on my testbox, i'm not sucessful to use the system numpy and scipy packages. i had to install them using pip. best regards Ulf
Valeri Galtsev
2018-Apr-06 18:53 UTC
[CentOS] Semi-OT: install python package in userspace
On 04/06/18 13:51, Ulf Volmer wrote:> On 06.04.2018 18:25, m.roth at 5-cent.us wrote: >> CentOS 7 box. As there's no package in any of the repos, we're trying to >> install scikit-learn in the user's space. It refuses. My late try was, >> after d/l a .whl from last year, hoping that would work with the numpy >> package in the regular repos, I did a pip install --user scikit-learn..., >> and it still seems to want to write to system space: OSError: [Errno 13] >> Permission denied: >> '/usr/lib64/python2.7/site-packages/numpy-1.7.1.dist-info > > can't reproduce your issue: > > [ulf at centos7-x1 ~]$ pip install --user scikit-learn > Collecting scikit-learn > Downloading scikit_learn-0.19.1-cp27-cp27mu-manylinux1_x86_64.whl (12.2MB) > 100% |????????????????????????????????| 12.2MB 101kB/s > Installing collected packages: scikit-learn > Successfully installed scikit-learn-0.19.1 > You are using pip version 8.1.2, however version 9.0.3 is available. > You should consider upgrading via the 'pip install --upgrade pip' command. > > But on my testbox, i'm not sucessful to use the system numpy and scipy > packages. i had to install them using pip.Python is a "sneaky snake" ;-) Valeri> > best regards > Ulf > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >-- ++++++++++++++++++++++++++++++++++++++++ Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247 ++++++++++++++++++++++++++++++++++++++++
Richard Grainger
2018-Apr-10 08:43 UTC
[CentOS] Semi-OT: install python package in userspace
I created the epypel (Extra Extra Python Packages for Enterprise Linux) yum repo for exactly this reason: https://harbottle.gitlab.io/epypel/ There are a bunch of additional Python 2 and Python 3 packages there and if you want any added, please put in a request here: https://gitlab.com/harbottle/epypel/issues/new The repo does not upgrade any packages in base or EPEL, so should be safe to use on most CentOS 7 systems. On Fri, Apr 6, 2018 at 5:25 PM, <m.roth at 5-cent.us> wrote:> CentOS 7 box. As there's no package in any of the repos, we're trying to > install scikit-learn in the user's space. It refuses. My late try was, > after d/l a .whl from last year, hoping that would work with the numpy > package in the regular repos, I did a pip install --user scikit-learn..., > and it still seems to want to write to system space: OSError: [Errno 13] > Permission denied: > '/usr/lib64/python2.7/site-packages/numpy-1.7.1.dist-info > > Anyone got any pointers? > > mark > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos
Richard Grainger
2018-Apr-10 08:51 UTC
[CentOS] Semi-OT: install python package in userspace
Just had a look at scikit-learn. An issue you have with the current version of this package is that is depends on NumPy (>= 1.8.2). The version of NumPy in CentOS 7 base is 1.7.1. You may need to look at building a Python virtual environment. You can google that ;) On Tue, Apr 10, 2018 at 9:43 AM, Richard Grainger <grainger at gmail.com> wrote:> I created the epypel (Extra Extra Python Packages for Enterprise > Linux) yum repo for exactly this reason: > https://harbottle.gitlab.io/epypel/ > > There are a bunch of additional Python 2 and Python 3 packages there > and if you want any added, please put in a request here: > https://gitlab.com/harbottle/epypel/issues/new > > The repo does not upgrade any packages in base or EPEL, so should be > safe to use on most CentOS 7 systems. > > On Fri, Apr 6, 2018 at 5:25 PM, <m.roth at 5-cent.us> wrote: >> CentOS 7 box. As there's no package in any of the repos, we're trying to >> install scikit-learn in the user's space. It refuses. My late try was, >> after d/l a .whl from last year, hoping that would work with the numpy >> package in the regular repos, I did a pip install --user scikit-learn..., >> and it still seems to want to write to system space: OSError: [Errno 13] >> Permission denied: >> '/usr/lib64/python2.7/site-packages/numpy-1.7.1.dist-info >> >> Anyone got any pointers? >> >> mark >> >> _______________________________________________ >> CentOS mailing list >> CentOS at centos.org >> https://lists.centos.org/mailman/listinfo/centos