moonglum / exogenesis

Build your dotfile installer, updater and teardown
MIT License
20 stars 8 forks source link

Problems with pip #48

Open bitboxer opened 10 years ago

bitboxer commented 10 years ago

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.

moonglum commented 10 years ago

pip is driving me insane...

bitboxer commented 10 years ago

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

thegcat commented 9 years ago

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 commented 9 years ago

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.

moonglum commented 9 years ago

Phew. Thanks for investigating :heart:

bitboxer commented 9 years ago

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

moonglum commented 9 years ago

I would say: No.

bitboxer commented 9 years ago

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

moonglum commented 9 years ago

Yes, I think that would be the best option!