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-and-Python.md <https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Homebrew-and-Python.md> Andrea > On 29 May 2015, at 7:49 am, Peter Hodges <[email protected]> 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 - [email protected] > 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
_______________________________________________ Distutils-SIG maillist - [email protected] https://mail.python.org/mailman/listinfo/distutils-sig
