For verification, I bought and set up a Raspberry Pi zero at the company. When I execute the created Python script, the behavior is strange.
I'm running without checking, but I'm sorry, but the running version is 2.7. I had confirmed that 3.7 was included, so I assumed that I was running it.
I will write an article about how to change it as a memorandum.
python --version
This is the end for 3 series. I'm 2 system so I'll continue.
ls -l /usr/bin/py*
You can see that python uses ** python2.7 **. ** Change the link to Python3 and it will be solved! !! !! ** **
unlink python
This breaks the link to python2 that python was referring to first.
ln -s python3 python
Create a python symlink that references python3. You can confirm that the link is made properly.
If you can check the Python version again and change it, you will succeed! !! !! (In this case, it is Python 3.7.3.)
These small details (privately) have the property of being easily forgotten. How do you do it especially in the environment settings? I have been researching the same thing over and over again. .. ..
It's easy to get sloppy if you're doing it alone, so I'll be careful these days. .. ..
Recommended Posts