Newbie to Python Goal try to use NLTK Mac OSX 10 I downloaded and installed python 3.5 Next I went to the NLTK site. It has instructions about easy_install and setup tools. I went to the Linux and Mac OS line: curl https://bootstrap.pypa.io/ez_setup.py -o - | python I entered this in a terminal window: curl https://bootstrap.pypa.io/ez_setup.py -o - | python % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 11432 100 11432 0 0 49709 0 --:--:-- --:--:-- --:--:-- 49921 Downloading https://pypi.python.org/packages/source/s/setuptools/setuptools-16.0.zip Extracting in /var/folders/fy/c6gf5sxx7px6p0tyj9ks3dw80000gn/T/tmpI86dYV Now working in /var/folders/fy/c6gf5sxx7px6p0tyj9ks3dw80000gn/T/tmpI86dYV/setuptools-16.0 Installing Setuptools running install Checking .pth file support in /Library/Python/2.7/site-packages/ error: can't create or remove files in install directory The following error occurred while trying to add or remove files in the installation directory: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-702.pth' The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: /Library/Python/2.7/site-packages/ Perhaps your account does not have write access to this directory? If the installation directory is a system-owned directory, you may need to sign in as the administrator or "root" account. If you do not have administrative access to this machine, you may wish to choose a different installation directory, preferably one that is listed in your PYTHONPATH environment variable. For information on other options, you may wish to consult the documentation at: https://pythonhosted.org/setuptools/easy_install.html Please make the appropriate changes for your system and try again. Something went wrong during the installation. See the error message above. I looked at the PATH variable: dhcp127-219:~ phodges$ echo $PATH /Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin dhcp127-219:~ phodges$ I would appreciate any suggestions on how to proceed. Thanks, Peter
On 28 May 2015 at 22:49, Peter Hodges
I would appreciate any suggestions on how to proceed.
If you downloaded Python 3.5, you should have pip available to you (I use Windows, so I'm not 100% sure how the OSX installers handle it, but it should be there). With pip, you should be able to simply run "pip install nltk" and be up and running. Paul
After a quick spot of research, I'm assuming you got to this point by reading http://www.nltk.org/install.html and following the link in step 1 to https://pypi.python.org/pypi/setuptools If that's the case, the answer to your questions is in the document you read. Under the "Unix and Mac OS" heading it tells you to "follow the wget instructions but replace wget with curl" If you follow the wget instructions, they note that you may get this error, and tell you how to proceed: Note that you will may need to invoke the command with superuser privileges to install to the system Python:
wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python
But don't do that. Those instructions are intended to work anywhere, from a
very old system that has a very very old version of python right through to
a system that already has everything installed.
You should be able to just go back to http://www.nltk.org/install.html and
start from step 3: Install Numpy (optional): run sudo pip install -U numpy
On Fri, May 29, 2015 at 8:35 PM Peter Hodges
Newbie to Python Goal try to use NLTK
Mac OSX 10 I downloaded and installed python 3.5
Next I went to the NLTK site. It has instructions about easy_install and setup tools.
I went to the Linux and Mac OS line:
curl https://bootstrap.pypa.io/ez_setup.py -o - | python
I entered this in a terminal window:
curl https://bootstrap.pypa.io/ez_setup.py -o - | python
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 11432 100 11432 0 0 49709 0 --:--:-- --:--:-- --:--:-- 49921
Downloading https://pypi.python.org/packages/source/s/setuptools/setuptools-16.0.zip
Extracting in /var/folders/fy/c6gf5sxx7px6p0tyj9ks3dw80000gn/T/tmpI86dYV
Now working in /var/folders/fy/c6gf5sxx7px6p0tyj9ks3dw80000gn/T/tmpI86dYV/setuptools-16.0
Installing Setuptools
running install
Checking .pth file support in /Library/Python/2.7/site-packages/
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-702.pth'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/Library/Python/2.7/site-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
https://pythonhosted.org/setuptools/easy_install.html
Please make the appropriate changes for your system and try again.
Something went wrong during the installation.
See the error message above.
I looked at the PATH variable:
dhcp127-219:~ phodges$ echo $PATH
/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
dhcp127-219:~ phodges$
I would appreciate any suggestions on how to proceed. Thanks, Peter _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig
On 30 May 2015 at 08:33, James Polley
After a quick spot of research, I'm assuming you got to this point by reading http://www.nltk.org/install.html
I filed https://github.com/nltk/nltk/issues/994 to suggest to the NLTK folks that they may want to update that page, if anyone would like to follow through with an actual pull request. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
Hi Peter, my take it as follows. On OS X Install python 3.5 using brew.sh http://brew.sh/ (brew install python3 --devel) then you are good to go. It will come with pip and it will install packages in a folder you have write access to, so pip3 install ntlk will work. PS: a simple explanation of your error is that, apparently, `python` is your system python (not the python you installed) and you don’t have write access to /Library/Python/2.7/site-packages/. You could solve this issues but I recommend the brew way, it’s the setup I use all the time. More details on brew+python are here https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Homebrew... https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Homebrew... Andrea
On 29 May 2015, at 7:49 am, Peter Hodges
wrote: Newbie to Python Goal try to use NLTK
Mac OSX 10 I downloaded and installed python 3.5
Next I went to the NLTK site. It has instructions about easy_install and setup tools.
I went to the Linux and Mac OS line:
curl https://bootstrap.pypa.io/ez_setup.py https://bootstrap.pypa.io/ez_setup.py -o - | python
I entered this in a terminal window:
curl https://bootstrap.pypa.io/ez_setup.py https://bootstrap.pypa.io/ez_setup.py -o - | python % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 11432 100 11432 0 0 49709 0 --:--:-- --:--:-- --:--:-- 49921 Downloading https://pypi.python.org/packages/source/s/setuptools/setuptools-16.0.zip https://pypi.python.org/packages/source/s/setuptools/setuptools-16.0.zip Extracting in /var/folders/fy/c6gf5sxx7px6p0tyj9ks3dw80000gn/T/tmpI86dYV Now working in /var/folders/fy/c6gf5sxx7px6p0tyj9ks3dw80000gn/T/tmpI86dYV/setuptools-16.0 Installing Setuptools running install Checking .pth file support in /Library/Python/2.7/site-packages/ error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the installation directory:
[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-702.pth'
The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was:
/Library/Python/2.7/site-packages/
Perhaps your account does not have write access to this directory? If the installation directory is a system-owned directory, you may need to sign in as the administrator or "root" account. If you do not have administrative access to this machine, you may wish to choose a different installation directory, preferably one that is listed in your PYTHONPATH environment variable.
For information on other options, you may wish to consult the documentation at:
https://pythonhosted.org/setuptools/easy_install.html https://pythonhosted.org/setuptools/easy_install.html
Please make the appropriate changes for your system and try again.
Something went wrong during the installation. See the error message above.
I looked at the PATH variable:
dhcp127-219:~ phodges$ echo $PATH /Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin dhcp127-219:~ phodges$
I would appreciate any suggestions on how to proceed. Thanks, Peter _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig
-- Andrea Bedini @andreabedini, http://www.andreabedini.com use https://keybase.io/andreabedini to send me private messages
participants (5)
-
Andrea Bedini
-
James Polley
-
Nick Coghlan
-
Paul Moore
-
Peter Hodges