last day (15 days later) » 

19:18
hey @jakub, you there by chance?
@LewlSauce - regarding stackoverflow.com/q/60937203/5666087, i see you used homebrew to install python 2. are you tied to python 2? it reached its end of life on january 1 2020. you can install python3 with homebrew
and then with that fresh python 3 install, you can try using python3 -m pip install netaddr
not necessarily, but i'm just using someone else's script that's written in python2, so just trying to get theirs to work
gotcha, one sec
oh ok, so stick with python 2 for now
yeah sadly just to get that working
@LewlSauce hello, cc @jakub. We prefer not to discuss questions here in parallel with main. Is it OK if I start a separate chatroom for this question?
19:20
@AndrasDeak
yes please do that
thanks, will do
0
Q: Cannot install netaddr from macbook

LewlSauceIn Linux, I just simply run pip install netaddr and everything works just fine. However, in Mac OS X version 10.15.4, this doesn't seem to be as straight-forward: [myuser:my-macbook-pro:~]$ sudo pip install netaddr ...

thanks you @AndrasDeak
thanks!
wait, let me move these messages
thanks!
19:21
hi @LewlSauce - i'm reading the homebrew docs on python docs.brew.sh/Homebrew-and-Python
15 messages moved from Python
can you tell me the output which python2
yep /usr/local/bin/python2
ok so can you try python2 -m pip
$ python2 -m pip
/usr/local/Cellar/python@2/2.7.15_3/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named pip
please try to install pip for your python2
note: don't use sudo pip install ..., it might corrupt your system
gotcha. should i try that with homebrew?
yeah definitely don't use sudo pip install. you rarefly want to do that
i think i installed pip with easy_install
ah
19:24
hold on here's the official way to do it
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python2 get-pip.py
and then you should be able to run python2 -m pip install netaddr
please see the link above in my message for installing pip
oh oops sorry @MisterMiyagi
hmm. very interesting. getting another error:

$ python2 get-pip.py 3:25PM/03.30
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.15_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.15_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_c
ok are you able to reinstall python2 with homebrew?
going to try now. one sec
19:27
ok you can try brew uninstall python@2 and then brew install python@2
was trying to figure out what's going on with homebrew as i got an error with that too:

$ brew install python@2 3:26PM/03.30
Error: No available formula with the name "python@2"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow

Error: No previously deleted formula found.
pretty crazy. trying to see if i can figure that out really quickly too
that's probably because of the end of life
ahhh
i gotcha. if that's the case, i might just forget about using the script that's supporting python2 still. maybe find something newer. not sure it's worth the trouble going down the deep rabbit hole, lol
note that if you fail to install via get-pip, you can probably copy the system pip to your home-brew installation of python2.
take this as a hint that staying on python2 is not a good idea.
yeah i agree. i'm just using a script someone else wrote in python2. all of mine are developed in 3
19:29
if the script isn't too long, you can try making it usable with python3
in this case though i'll probably just look for something else or write my own
agreed. it's just about 76 lines and just expands/contracts a list of IPs into individual IPs or CIDR. i'm sure there are plenty out there for that
have you tried throwing 2to3 at it?
ah good point!
not on this one. let me see
rocking and rolling!!!
i appreciate it!!!
great suggestion @MisterMiyagi !!
19:33
agreed. really appreciate it!
thanks for your help too @jakub!
you should post that as the answer @MisterMiyagi on stackoverflow.com/questions/60937203/…
my pleasure!
@jakub I'd rather not, it doesn't really answer the question itself.
19:51
@MisterMiyagi - ok that's a fair point

last day (15 days later) »