Brew install python without pointing to python anymore

I am trying to install jupyter on mac, I understand the Mac comes with python version installed But I also installed brew and installed python via brew.

When I check the python location I get:
which python /usr/bin/python

When I check the location of the point, I get:
which pip


/usr/local/bin/pip

When I try to install jupyter:
pip install install

after lengthy installation, it tried to uninstall the python package it wants to update AND fails: enter image description here When trying to uninstall dateutil.
I think these are mac packages. I tried with sudo, no change.
As far as I can figure it out, because files are immutable.
I tried to remove with immutable:
chflags uchg

.
Without changes.

I also tried to use the virtual env, using:
sudo pip install virtualenvwrapper

.
But this point is trying to delete another python folder.
Any suggestions?
Thanks to


UPDATE:

It seems like brew is creating links from python2. in python2
And same for python3.
I tried to create the link myself, it worked and I was able to install the package I needed. But this is not a very good solution, the
whole point of the brew is to manage this for me, next time I update python it will break. Any suggestions why? maybe because brew installed two python versions on my laptop?


IT WAS RESOLVED AS FOLLOWS:

Found the answer, thanks @tdube question, I went and looked at what the brew guys did in python and found this thread from Jan 17th .
I get that they changed the behavior or installed python.
No, you don't have just python.
You have python2 and python3.
No more just pip, now you have pip2 and pip3.

This is a major change from the default behavior of how people use python Especially that Mac comes with python by default

so now you have python which is / usr / bin / python python2 which is / usr / local / bin / python 2 python3 which is / usr / local / bin / python 3

this is the fix guys suggest brew (you can see it at startup brew info python

):

==> Caveats
This formula installs a python2 executable to /usr/local/bin.
If you wish to have this formula python executable in your PATH then add
the following to ~/.zshrc:
  export PATH="/usr/local/opt/python/libexec/bin:$PATH"

Pip and setuptools have been installed. To update them
  pip2 install --upgrade pip setuptools

You can install Python packages with
  pip2 install <package>

They will install into the site-package directory
  /usr/local/lib/python2.7/site-packages

See: http://docs.brew.sh/Homebrew-and-Python.html

      

You can read about it in this thread:

+3


source to share


1 answer


Python, which is "preinstalled" on the Mac, is in /usr/bin/python

. I think you need to reorder the entries in the environment variable PATH

as mentioned here ( default python homebrew ). Which file is your PATH

installed depending on which shell you are using.



0


source







All Articles