exogenesis icon indicating copy to clipboard operation
exogenesis copied to clipboard

Problems with pip

Open bitboxer opened this issue 10 years ago • 9 comments

Looks like pip does not like the --user argument when updating itself anymore. I am getting this error when using exogenesis:

Exception:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/commands/install.py", line 283, in run

    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/req.py", line 1435, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/req.py", line 671, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/req.py", line 901, in move_wheel_files
    pycompile=self.pycompile,
  File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/wheel.py", line 140, in move_wheel_files
    scheme = distutils_scheme(name, user=user, home=home, root=root)
  File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/locations.py", line 155, in distutils_scheme
    i.finalize_options()
  File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 272, in finalize_options
    raise DistutilsOptionError("can't combine user with prefix, "
DistutilsOptionError: can't combine user with prefix, exec_prefix/home, or install_(plat)base

Storing debug log for failure in /Users/bodo/.pip/pip.log

And when I try it on the console and leave out the --user, it works. With it, it stops with this message.

bitboxer avatar May 05 '14 07:05 bitboxer

pip is driving me insane...

moonglum avatar May 05 '14 18:05 moonglum

You are not the only one with that problem :sob:

bitboxer avatar May 05 '14 18:05 bitboxer

I'm currently getting:

                                                                                            🐍  Python 🐍                                                                                             
                                                                      Install Python: 👉
                                                                         Link Python: 👍
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 5, in <module>
    from pkg_resources import load_entry_point
  File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources.py", line 2805, in <module>
    """Get an mro for a type or classic class"""
  File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources.py", line 443, in _build_master
    # try it without defaults already on sys.path
  File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources.py", line 456, in _build_from_requirements
    # then copy back to sys.path
  File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources.py", line 635, in resolve
    new_requirements = dist.requires(req.extras)[::-1]
pkg_resources.DistributionNotFound: pip==1.5.6
                                                                         Install pip: An Error occured while executing `pip install --user pip`: 
 Traceback (most recent call last):
  File "/usr/local/bin/pip", line 5, in <module>
    from pkg_resources import load_entry_point
  File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources.py", line 2805, in <module>
    """Get an mro for a type or classic class"""
  File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources.py", line 443, in _build_master
    # try it without defaults already on sys.path
  File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources.py", line 456, in _build_from_requirements
    # then copy back to sys.path
  File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources.py", line 635, in resolve
    new_requirements = dist.requires(req.extras)[::-1]
pkg_resources.DistributionNotFound: pip==1.5.6
 👎

So: same here :cry:

thegcat avatar Jan 10 '15 08:01 thegcat

Mmh, completely removing the homebrew python (brew uninstall python && rm -rf $(brew --prefix)/lib/pythonX.Y/site-packages for 2.7), reinstalling it ad applying the ~/.pydistutils.cfg described in https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Homebrew-and-Python.md#note-on-pip-install---user seem to work for me.

thegcat avatar Jan 10 '15 09:01 thegcat

Phew. Thanks for investigating :heart:

moonglum avatar Jan 12 '15 06:01 moonglum

Yes, this works. Should we add the pydistutils.cfg during the setup phase? This could be dangerous :flushed:

bitboxer avatar Jan 17 '15 20:01 bitboxer

I would say: No.

moonglum avatar Jan 18 '15 07:01 moonglum

So what else could we do for our users? Check for this error and output a hint that helps to fix this?

bitboxer avatar Jan 18 '15 12:01 bitboxer

Yes, I think that would be the best option!

moonglum avatar Jan 21 '15 08:01 moonglum