Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid command 'egg_info' #286

Closed
emirotin opened this issue May 15, 2011 · 8 comments
Closed

invalid command 'egg_info' #286

emirotin opened this issue May 15, 2011 · 8 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@emirotin
Copy link

Getting this error when trying to install any package, like:

sudo pip install pyserial
sudo pip install --upgrade pip

or even

sudo ./get-pip.py

at the same moment easy_install works fine

Mac OSX, python 2.7, pip 0.8.2, distribute 0.6.16 from macports

@pnasrat
Copy link
Contributor

pnasrat commented May 15, 2011

Attempting to replicate

mkvirtualenv -p python2.7
pip uninstall pip
easy_install -f http://d.pypi.python.org/packages/source/p/pip/pip-0.8.2.tar.gz#md5=df1eca0abe7643d92b5222240bed15f6 pip==0.8.2
pip 0.8.2 from /Users/pnasrat/Development/.virtualenvs/pip-upgrade/lib/python2.7/site-packages/pip-0.8.2-py2.7.egg (python 2.7)

I then did

pip install distribute==0.6.16
pip install pyserial

That worked for me.

Can you paste the full output of what occurs when you try these commands. You can use three backticks to mark the start and end of a block - see the GitHub Flavored Markdown link above the comment box in the issue.

@emirotin
Copy link
Author

I, in reverse, have installed distribute and pip with macports, and am not using virtualenv (I need the majority of packages to be available system-wide)

Full output of
sudo pip install --upgrade pip:

Downloading/unpacking pip
Running setup.py egg_info for package pip
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'entry_points'
warnings.warn(msg)
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'zip_safe'
warnings.warn(msg)
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'test_suite'
warnings.warn(msg)
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help

error: invalid command 'egg_info'
Complete output from command python setup.py egg_info:
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'entry_points'

warnings.warn(msg)

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'zip_safe'

warnings.warn(msg)

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'test_suite'

warnings.warn(msg)

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'tests_require'

warnings.warn(msg)

usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]

or: -c --help [cmd1 cmd2 ...]

or: -c --help-commands

or: -c cmd --help

error: invalid command 'egg_info'


Command python setup.py egg_info failed with error code 1
Storing complete log in /Users/eugenemirotin/.pip/pip.log

cat /Users/eugenemirotin/.pip/pip.log - same plus

Command python setup.py egg_info failed with error code 1
Exception information:
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-0.8.2-py2.7.egg/pip/basecommand.py", line 130, in main
self.run(options, args)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-0.8.2-py2.7.egg/pip/commands/install.py", line 223, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-0.8.2-py2.7.egg/pip/req.py", line 941, in prepare_files
req_to_install.run_egg_info()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-0.8.2-py2.7.egg/pip/req.py", line 219, in run_egg_info
command_desc='python setup.py egg_info')
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-0.8.2-py2.7.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

@pnasrat
Copy link
Contributor

pnasrat commented May 15, 2011

I've just installed macports from the dmg and done

sudo port install python27
sudo port install py27-distribute
sudo port install py27-pip

Giving

sudo pip-2.7 --version
pip 1.0.1 from /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (python 2.7)

Then I can do

sudo pip-2.7 install -U pip
Downloading/unpacking pip
  Downloading pip-1.0.1.tar.gz (104Kb): 104Kb downloaded
  Running setup.py egg_info for package pip

    warning: no files found matching '*.html' under directory 'docs'
    warning: no previously-included files matching '*.txt' found under directory 'docs/_build'
    no previously-included directories found matching 'docs/_build/_sources'
Installing collected packages: pip
  Found existing installation: pip 0.8
    Uninstalling pip:
      Successfully uninstalled pip
  Running setup.py install for pip

    warning: no files found matching '*.html' under directory 'docs'
    warning: no previously-included files matching '*.txt' found under directory 'docs/_build'
    no previously-included directories found matching 'docs/_build/_sources'
    Installing pip script to /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin
    Installing pip-2.7 script to /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin
Successfully installed pip
Cleaning up...

Can you paste in

sudo port list installed

@emirotin
Copy link
Author

Yes, please find here: http://pastebin.com/TndgVa3c
Strange enough, my ports installation doesn't suggest pip-1.0.1

@hltbra
Copy link
Contributor

hltbra commented May 15, 2011

egg_info is a setuptool's feature, maybe your distribute package has problems...

Is there any good reason to use macports to install pip and distribute? I strongly recommend you to not use macports (or any other OS system package) to install python packages, because OS package maintainers use to customize things and I remember Debian and Ubuntu breaking setuptools's package.

@emirotin
Copy link
Author

well, yes, I know it might be because of distribute, but distribute itself is working fine
regarding mac ports: no, no special need for that, just because at the moment I was installing pip easy_install was the recommended way, as far as I remember, and I didn't want installing something from sources (not because of laziness, but because I want as much as possible to be behind some package manager)

passing macports in this cases means installing distribute from sources - correct? I mean, is it still needed for pip install?

@hltbra
Copy link
Contributor

hltbra commented May 15, 2011

Pip still needs distribute/setuptools...

You can install them easily with:

$ curl -O http://python-distribute.org/distribute_setup.py
$ python distribute_setup.py

$ curl -O https://github.com/pypa/pip/raw/master/contrib/get-pip.py
$ python get-pip.py

@emirotin
Copy link
Author

well, regarding distribute - I discovered that some (macports) packages depend on it, and these packages, I suppose, are in turn requirements for other packages.
but I re-installed fresh distribute and pip (btw, curl for github requires -k to ignore certificate warning) - now pip is 1.0.1 and is working fin, thanks!

re #286 (comment)

sudo port install py27-pip
sudo pip-2.7 --version
pip 1.0.1 from /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (python 2.7)

That's really strange as pip 1.0.1 is not in ports yet: http://www.macports.org/ports.php?by=name&substr=py27-pip

Anyway, thanks in advance!

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

3 participants