[27645] in Athena Bugs

home help back first fref pref prev next nref lref last post

RE: Debathena: sudo pip install -U pyyaml nltk

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Sun Jan 5 19:32:34 2014

From: Jonathan D Reed <jdreed@mit.edu>
To: Geoffrey G Thomas <geofft@mit.edu>, Andrew C Xu <andrewxu@mit.edu>
Date: Mon, 6 Jan 2014 00:32:28 +0000
Message-ID: <3FFC7F4D2201CE49B49E5580FE0B5C0A56804B09@OC11expo28.exchange.mit.edu>
In-Reply-To: <alpine.DEB.2.00.1401051432020.9322@dr-wily.mit.edu>
Content-Language: en-US
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Cc: "bugs@mit.edu" <bugs@mit.edu>
Errors-To: bugs-bounces@mit.edu

Hi Andrew, 

As Geoff noted, many popular PyPI packages are also available as Ubuntu packages and can be installed with "apt-get install".

It looks like one of the packages is packaged using "distlib", which wants to create a cache in your home directory at ~/.distlib.  When run under "sudo", however, you won't have valid AFS tokens with which to access your directory, which results in that error.  Unfortunately, it looks like the "distlib" suite of tools only allows overriding this location on Windows, but not on any other platform.

You may want to instead pass the "--user" option to "pip install", which will install the modules in your home directory.  You can then set the PYTHONPATH environment variable appropriately, and will be able to use the modules on any Athena workstation, and won't have to install them each time.

You could run "mkdir -p /mit/andrewxu/.local/lib/python2.7/site-packages", and then "pip install --user pyyaml" (without "sudo"), and then you should be all set, if you set PYTHONPATH to include /mit/andrewxu/.local.

-Jon
________________________________________
From: bugs-bounces@MIT.EDU [bugs-bounces@MIT.EDU] on behalf of Geoffrey Thomas [geofft@MIT.EDU]
Sent: Sunday, January 05, 2014 5:35 PM
To: Andrew C Xu
Cc: bugs@mit.edu
Subject: Re: Debathena: sudo pip install -U pyyaml nltk

Hi Andrew,

Does "sudo apt-get install python-yaml python-nltk" work for this purpose?

(Still, I would have expected `sudo pip install` to work. We'll look into
it; thanks for the report.)

--
Geoffrey Thomas
geofft@mit.edu

On Sun, 5 Jan 2014, andrewxu@MIT.EDU wrote:

> System name:          M12-182-5
> Type:                 x86_64
> Display type:         Advanced Micro Devices, Inc. [AMD/ATI] Caicos XT [Radeon HD 7470/8470]
>
> Shell:                        /bin/athena/bash
> Window manager:               unknown
> Desktop session:      athena
>
> 1) What were you trying to do? Download pyyaml and nltk (needed for Natural Language toolkit, which I need for a project - nltk.org/install.html)
>
>
> 2) What happened? OSError: [Errno 13] Permission denied: '/afs/athena.mit.edu/user/a/n/andrewxu/.distlib'
>
>
> 3) What should have happened? I should have been able to download it.
>
>
> 4) Does this problem happen only on this workstation, or other workstations? Other workstations too!
>
>
> 5) If you were following instructions, please include the URL or a
>   description of the documentation:
>   (e.g. a "problem set for 18.03" or http://ist.mit.edu) nltk.org/install.html
>
>
>
>


home help back first fref pref prev next nref lref last post