« first day (3125 days earlier)      last day (1824 days later) » 

wim
11:01 PM
type which python3
then type which python3.7
then type sudo ln -sf TWO ONE where TWO was the output of the second command above and ONE was the output of the first command
 
wim
11:18 PM
One of the PyCon tutorials was a machine-learning based dog breed classifier, from whence I learned about this awesome dog pics API: dog.ceo
 
awww, so many good boys and girls
 
wim
there is also a web service classifier what-dog.net
and a truckload of training data here in the Stanford Dogs Dataset
 
ok someone just write a script to feed dog.ceo images to what-dog.net
also I hope what-dog.net just classifies every dog as a "good girl" or "good boy"
 
which python3
python3: aliased to python3
 
@wim no dachshunds, #triggered
 
11:21 PM
which python3.7
python3.7 not found
@wim i got those two answers
 
how did you install 3.7?
 
i can't remember :( it was a really long time back.. when i try
brew upgrade python3
it tells me python3.7.3 is already installed
 
what about python3 --version, what does that tell you?
 
wim
do: unalias python3
 
however when i do python3 -V , it is python 3.6.5
 
11:24 PM
I see
 
wim
and do locate python3.7
 
how do i locate it?
 
wim
that is a command
locate python3.7
since it's not on your path, apparently.
 
which python3.7.3 will probably be it
 
If you installed Python via Brew it should be in /usr/local/Cellar/
 
11:25 PM
oops, no
I thought one of those micro versioned outputs was a which-like
 
wim
unless you did something weird it should be at /usr/local/bin/python3.7
 
i found 3.7.3 in /usr/local/Cellar as you said
 
/usr/local/Cellar/python/3.7.3/bin/python3.7 is the actual binary location homebrew installs to
 
ok?
 
wim
ok then put the symlink like: sudo ln -sf /usr/local/Cellar/python/3.7.3/bin/python3.7 /usr/local/bin/python3
 
11:27 PM
just symlink it
^ that
 
ok, i just did that
 
wim
so, working?
 
still when i type python3 -V it still points to 3.6.5
 
now you have a "pseudo" (syslink) version of the binary at /usr/local/bin/python3 instead of the long homebrew path. Likely, usr/local/bin is on your path so python3 shgould be findable
 
i want to point to 3.7
 
11:28 PM
Good lord pyenv is so much easier
 
Okay, so that means the python 3.6 executable exists on your path before 3.7
I heavily disagree, lol
I used pyenv for 2 seconds on this new computer and broke everything
lol
 
ok, what do i do now?
 
wim
yeah pyenv can GTFO
 
Well, perhaps pyenv is fundamentally broken and everyone else just got lucky
 
wim
well, you should be done ..
 
11:29 PM
python3 -V
Python 3.6.5
 
@wim oh have a little sympathy for someone that doesn't know unix stuff
 
wim
ok do: which -a python3
 
it is still pointing to python 3.6 and not 3.7
which -a python3
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3
/usr/local/bin/python3
 
wim
you can rm the first entry
 
@JoeSaad so the way this works, is that you have a variable set in your bash environment that is called PATH. You can check what your path looks like at any time with echo $PATH. You'll see a bunch of directories separated by :. When you try to use an executable program (e.g. python3 somestuff) it looks in all the folders defined in PATH
 
wim
11:32 PM
why that is in $PATH anyway? stupid installer should not do that
 
currently your PATH has /Library/Frameworks/... in it BEFORE /usr/local/bin/python3 which means when you type python3 it finds the first one and uses it
All you have to do is remove the /Library/Frameworks/... one from your PATH
 
oh, so rm the first directory?
just do rm /Library/Frameworks/Python.framework/Versions/3.6/bin/python3
?
 
well, if you still want 3.6, then no
and either way, that just deletes the binary, not the other stuff
 
i saw some blogs saying that 3.6 is good to have since 3.7 doesn't have backward compatibility.. maybe that's why i installed both in the same time.. but i don't think i need it..
 
what? lol
 
wim
11:34 PM
crappy blog
 
Take a look at youir bash profile: cat ~/.bash_profile
it'll show you how your PATH is set
 
wim
macOS system Python is 2.7
 
every time you open up a terminal, it uses the definitions in there to create your Path
 
wim
so you should probably just delete 3.6
 
ok then, i will delete it
 
11:35 PM
you can just literally remove the line that has /Library/Frameworks/... from that file
okay well just rm -rf /Library/Frameworks/Python.framework/Versions/3.6 then
 
got it now working
 
it'll still be on your PATH but...w/e
 
yes i added the -rf, forgot about it at first
 
well -rf if you point to the folder...
anyways. have fun~
 
now it works
python3 -V
Python 3.7.3
thanks so much @alkasm and @wim
 
11:37 PM
Anyone know of a good resource to explain PATH so that I uh, don't have to type that out again? lol
np @JoeSaad
 
wim
wtf- someone just randomly downvoted this 2013 answer
how can anyone possibly disagree with that is beyond me..
 
:shrug:
here, have an updoot
 
wim
looking at other answers, they may have drive-by dinged everybody
 
ok, the reason i was trying to get python3 3.7 to work is that i kept getting this error: "
ModuleNotFoundError: No module named 'dataclasses'
 
wim
yep, that new in 3.7
but you can just install attrs in earlier Python versions
(bcos that's what stdlib dataclasses blatantly ripped off)
 
11:43 PM
according to this forums.fast.ai/t/… it should only work with python 3.7
@wim so what do i do again?
 
wim
what you already did.
 
lol
how are you running your code?
 
hmmm.. trying to run it with python3 still getting that error
 
wim
bah
 
ModuleNotFoundError: No module named 'dataclasses'
 
11:45 PM
more concretely please
how exactly are you running your code
 
wim
 
python3 <nameOfPythonFile>
 
LOL
and if you do a which python3 ?
 
wim
i'm done
 
@wim They're out to get ya!
 
11:49 PM
which python3
/usr/local/bin/python3
i deleted that entire directory and rerun my code and it is complaining about this
 
@JoeSaad now run ls -l /usr/local/bin/python3
 
ModuleNotFoundError: No module named 'falcon'
 
deleted which directory?
 
@wim Lol no syntax highlighting in patch link. Low quality post. :P
 
well what the hell is falcon?
 
11:51 PM
just my code directory
ls -l /usr/local/bin/python3
lrwxr-xr-x  1 root  admin  44 May  7 18:27 /usr/local/bin/python3 -> /usr/local/Cellar/python/3.7.3/bin/python3.7
 
isn't falcon a web framework?
 
if i had to keep tabs on all of those....
 
@Dair yarp
 
@JoeSaad first you showed a module not found error for dataclasses and then for falcon. which is it? why is it different? what did you change?
 
the falcon is the only one coming now.. i closed the terminal of the first one and cleaned my code directory and restarted the code and i am getting this other error
 
11:54 PM
@JoeSaad that seems to show that you are in fact using py3.7
 
yes i am on py3.7
all is set now.. i think this is related to falcon, a different issue..
 
huffing and puffing well dont say youre getting an error you're not getting! D:
 
thanks for helping me point to 3.7
 
probably you had falcon installed on your 3.6 environemtn, now you have 3.7
create a virtual environment and install yo stuff in it
 
Use like pipenv or rose or something
 
11:55 PM
yes, this is what i did as a fresh start but still it's giving that error
 
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install falcon
 
i did pip3 install falcon
 
which pip3
 
@JoeSaad Oh no.
 
oh, pip3 is using py3.6 :(
which pip3
/Library/Frameworks/Python.framework/Versions/3.6/bin/pip3
 
11:57 PM
bc you didnt delete the directory that i pointed you to. lol
you shouldve just removed it from your path
 
i delete it it..
 
but now that we're here..
no you didnt
you deleted the python executable only, not the whole folder.
 
Erase it from the face of the earth.
 
rm -rf /Library/Frameworks/Python.framework/Versions/3.6
You deleted .../3.6/bin/python instead of .../3.6. The 3.6 folder still has the pip executable and other things in it other than just python
 
ok, i did it again.. apparently the first time it didn't
ok, trying again now
thanks again :)
 

« first day (3125 days earlier)      last day (1824 days later) »