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

Instructions broke my pip :-( #1032

Closed
mulka opened this issue Dec 7, 2018 · 6 comments
Closed

Instructions broke my pip :-( #1032

mulka opened this issue Dec 7, 2018 · 6 comments

Comments

@mulka
Copy link

mulka commented Dec 7, 2018

Summary

I think the Mac development instructions broke my pip :-(

After I ran this:
pip3 install --user -r requirements.txt

pip3 stopped working:
Kyles-MacBook-Pro-3:plover mulka$ pip3
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/bin/pip3", line 7, in
from pip import main
ImportError: cannot import name 'main'

Reproducing

Plover Version

3fdda2c

System

macOS High Sierra 10.13.6

@benoit-pierre
Copy link
Member

The later versions of pip use a different main entry point, I assume you ended up installing a new pip in your user site, but because you still use the system launcher, the wrong entry point is being used. Update your PATH: use python3 -m site to get an idea of where your user site is. Alternatively, you can invoke pip with python3 -m pip.

@mulka
Copy link
Author

mulka commented Dec 7, 2018

Kyles-MacBook-Pro-3:plover mulka$ python3 -m site
sys.path = [
'/Users/mulka/Documents/Code/plover',
'/Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip',
'/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6',
'/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload',
'/Users/mulka/Library/Python/3.6/lib/python/site-packages',
'/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages',
]
USER_BASE: '/Users/mulka/Library/Python/3.6' (exists)
USER_SITE: '/Users/mulka/Library/Python/3.6/lib/python/site-packages' (exists)
ENABLE_USER_SITE: True

@benoit-pierre
Copy link
Member

I don't know what's the standard user site bin directory on macOS, using python -c 'from pip._internal.locations import bin_user; print(bin_user)' should print it. This directory should contain a working pip launcher.

@mulka
Copy link
Author

mulka commented Dec 7, 2018

I think for me it was /Users/mulka/Library/Python/3.6/bin. I added that to my path, and it seems to work now.

@mulka
Copy link
Author

mulka commented Dec 7, 2018

(to get that, I just just took the USER_BASE from the previous command and added /bin)

@mulka
Copy link
Author

mulka commented Dec 7, 2018

I'm curious why you guys aren't using a virtual environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants