nltk/nltk — Issue #108: easy_install fails for Python 2.6.5 on Mac OS X 10.5.8
Author: alexrudnick
Created: 2012-01-17 06:26:15+00:00
State: open

When I try to install with easy_install, I get the following:

$ sudo easy_install nltk
Searching for nltk
Reading http://pypi.python.org/simple/nltk/
Reading http://www.nltk.org/
Reading http://nltk.sf.net/
Reading http://nltk.org/
Reading http://www.nltk.org/download
Best match: nltk 2.0b8.macosx-10.5-i386
Downloading http://pypi.python.org/packages/any/n/nltk/nltk-2.0b8.macosx-10.5-
i386.tar.gz#md5=1d9b5dc378b851e775e3fe4cc5aecfaf
Processing nltk-2.0b8.macosx-10.5-i386.tar.gz
error: Couldn't find a setup script in /tmp/easy_install-f560Qm/nltk-2.0b8.macosx-10.5-i386.tar.gz

I noticed that if I download the binary myself and untar it, it produces an unusual directory structure of
./opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/nltk/ which might explain part of
the problem.

I believe that this will be very easy to reproduce. Let me know if I can do anything to help.

Migrated from http://code.google.com/p/nltk/issues/detail?id=534

earlier comments

kmike84 said, at 2010-06-06T22:38:40.000Z:

The same problem. Virtualenv is used. Output from easy_install is the same.

Output from pip 0.7.2:

pip install nltk
Downloading/unpacking nltk
Downloading nltk-2.0b8.macosx-10.5-i386.tar.gz (1.7Mb): 1.7Mb downloaded
Running setup.py egg_info for package nltk
Traceback (most recent call last):
File "", line 14, in
IOError: [Errno 2] No such file or directory: '/Users/kmike/envs/pymorphy/build/nltk/setup.py'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "", line 14, in

IOError: [Errno 2] No such file or directory: '/Users/kmike/envs/pymorphy/build/nltk/setup.py'

stevewinton said, at 2010-12-17T17:54:55.000Z:

+1 Me too! Python 2.6 on OS X 10.5.8

Traceback (most recent call last):
File "/Users/steve/env/scratch/lib/python2.6/site-packages/pip-0.8.1-py2.6.egg/pip/basecommand.py", line 130, in main
self.run(options, args)
File "/Users/steve/env/scratch/lib/python2.6/site-packages/pip-0.8.1-py2.6.egg/pip/commands/install.py", line 223, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/Users/steve/env/scratch/lib/python2.6/site-packages/pip-0.8.1-py2.6.egg/pip/req.py", line 941, in prepare_files
req_to_install.run_egg_info()
File "/Users/steve/env/scratch/lib/python2.6/site-packages/pip-0.8.1-py2.6.egg/pip/req.py", line 219, in run_egg_info
command_desc='python setup.py egg_info')
File "/Users/steve/env/scratch/lib/python2.6/site-packages/pip-0.8.1-py2.6.egg/pip/__init__.py", line 249, in call_subprocess
% (command_desc, proc.returncode))
InstallationError: Command python setup.py egg_info failed with error code 1

schickm said, at 2011-01-14T23:35:21.000Z:

The issue seems to be the way the source get's extracted into build/nltk. If you look in the directory you'll see that there an additional directory of build/nltk/nltk-2.0b9, this contains the actual source (including setup.py). If you move it's contents one directory up, and then rerun easy_install/pip (I only did it with pip), then install should work fine.

kmike84 said, at 2011-07-13T22:20:21.000Z:

Finally got it. This works fine for me:

pip install http://pypi.python.org/packages/source/n/nltk/nltk-2.0.1rc1.tar.gz

Why is nltk-2.0.1rc1.macosx-10.6-x86_64.tar.gz uploaded to pypi? I think the problem with virtualenv can be solved by just removing this file.