Upgrading Ubuntu Python 3.8.2 to Python 3.8.5 - python

I have a fresh install of Ubuntu that has Python 3.8.2. I am also starting university soon, and the professor would like us students to use Python 3.8.5. So far, I have only found instructions on how to update Python 2.x.x or 3.x.x to Python 3.8.x and not 3.8.x to 3.8.x, so I was wondering how should i go about the process in my case?

Doing this is simple and does not necessarily require 100% usage on the terminal, and there is practically no difference between an x.x.x to an x.x.y, but to install
Acess this link
First, let's remove the current version with:
sudo apt remove python
then
Unzip in your preferred folder
Open the folder in the terminal and type: ./install-sh
Be happy

Related

How to install Python 3.8 along with Python 3.9 in Arch Linux?

I'm working with tensorflow. Recently Arch replaced Python 3.8 with 3.9 and at the moment there is no tensorflow build for Python 3.9. Downgrading Python version for the whole system for that single reason do not looks like good idea for me. My goal is to create virtual environment with python 3.8.
Is there a way to have both (3.8 and 3.9) versions available in the system? Python page of arch wiki doesn't mention that.
EDIT:
I know, I can use: virtualenv -p python3.8 py38 but I need an interpreter in the system.
Go for package python38 in AUR, if you have an AUR helper like yay just use yay -S python38. Otherwise, just download the PKGBUILD and install manually with makepkg.
You can also update python with pacman -Syu (which is now python3.9). Then the two shall live together, inside /usr/bin/python3.x.
Use virtual environment to manage them if you like, virtualenv --python=/usr/bin/python3.x yourenvname.
Downgrading Python version for the whole system for that single reason do not looks like good idea for me.
This is a good observation. You should not modify the system installation of python. After you install the AUR package that Ahacad mentions. I suggest using virtualenv or the standard venv package to create a virtual environment for your tensorflow projects.

Homebrew python version different than Mac python version?

I've searched a while and haven't found an answer to this particular issue.
brew info python returns python: stable 3.7.7 (bottled), HEAD
However, python -V and python3 -V return Python 3.6.1 :: Anaconda 4.4.0 (x86_64)
Why is my Mac python version different than what I've installed with HB, and how can I fix it? Thank you!
One version of python was installed using the Anaconda distribution. The other by Homebrew. It's not surprising that they are different versions. You should run in virtual environments and then you won't need to worry about 2 versions. Using the Anaconda distribution it is easy to set up a virtual environment to run that version.
Erg. Yes—this is a challenge sometimes. macOS ships with python as part of its system. Catalina 10.15.4 ships with /usr/bin/python3 of 3.7.3. brew (at the moment) has installed 3.7.7 as its stable branch, but it also offers a python#3.8 which installs 3.8.2. That's significant because there are other brew packages (notably vim) which specity python#3.8 as a dependency. Yuck.
I'm not running anaconda at the moment, but I'll take your word that it's yet-another version.
Whichever appears first in your path is going to prevail unless you're operating inside a context like a virtual environment. You can arrange your path to set your preferred python3 to run. You can always check which python3 is running by using "which python3" and that will give you the full path of the running program.
Word of caution: Each distinct python3 will maintain its own packages library. Once you have your paths sorted out, you should manage your packages with "python3 -m pip " to be sure you're managing the libraries for your intended version.
And yes—eventually, it'd probably be good for us to work in virtual environments or skip straight to Docker containers.

Install python3.6 on Termux android terminal emulator

I am tring to excetute a GitHub pyton script on my Android smartphon using Termux.
I knew that this script doesn't run on Python 3.8.1 (which is the default version installed when typed "pkg install python" but it runs very well on previous versions of linux. I have to mention that I know this since I was running this script on my laptop and I have different version of python installed.
However, I've looked for a couple of days in a row on google and I didn't find a way to install an older python version on my Termux. Could you please help me out on this?
Thanks in advance,
Lorenzo
Unlike regular Linux Distributions, Termux does not keep a history of the version updates hence installing Python 3.6 is a difficult task, but it's not impossible, you'll have to build and install python from its source code. Which you can find (for version 3.6.10) here : https://www.python.org/downloads/release/python-3610/
And if you need help with installation, I'd ask you to follow the guide here without the sudo commands. (https://docs.rstudio.com/resources/install-python-source/)
pkg i python==[version]
you specify the version you want just after the package name. That is
pkg i python==3.6 -y
considering 3.6 is the version then the -y simply means yes
its actually pkg i python=3.6 and termux don't have that python version

Error when installing Tensorflow - Python 3.8

I'm new to programming and following a course where I must install Tensorflow. The issue is that I'm using Python 3.8 which I understand isn't supported by Tensorflow.
I've downloaded Python 3.6 but I don't know how to switch this as my default version of python.
Would it be best to set up a venv using python 3.6 for my program and install Tensorflow in this venv?
Also, I using Windows and Powershell.
Tensorflow is only supported until python 3.7 as of now.
You can check it here: https://www.tensorflow.org/install/pip
But there is a way to install it on Python3.8, just run the below command that will do your job:
python -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl
This command work on mac and windows both, I haven't tested on Linux.
You should always use venv because by default every project on your system will use these same directories to store and retrieve site packages (third party libraries). At first glance, this may not seem like a big deal, and it isn’t really, for system packages (packages that are part of the standard Python library), but it does matter for site packages.
Consider the following scenario where you have two projects: ProjectA and ProjectB, both of which have a dependency on the same library, ProjectC. The problem becomes apparent when we start requiring different versions of ProjectC. Maybe ProjectA needs v1.0.0, while ProjectB requires the newer v2.0.0.
You can also take a look at anaconda, it’s the most populasr data sciencie platform and will be easy for you install tensorflow and jupiter notebook in just 2 clicks. Anaconda
Uninstall all your python versions and use the latest anaconda.
$ conda create --name tensorflow python=3.5
This way you create a virtual environment with python 3.5 which is supported by tensorflow.
So now you can install it.
$ activate tensorflow
(tensorflow) $ pip install tensorflow
it would have been nice if you would have the share the error screenshot
though as per i got the case
tensorflow work in both 3.8 and 3.6 just you have to check that you have 64bit version not 32 bit
you can acess both version from thier respective folder no need to install a venv
If you don't want to use Anaconda or virtualenv, then actually multiple Python versions can live side by side. I use Python38 as my default and Python35 for TensorFlow until they release it for Python38. If you wish to use the "non-default" Python, just invoke with the full path of the python.exe (or create a shortcut/batch file for it). Python then will take care of using the correct Python libs for that version.
Worked on Python 3.8.2 (default, Mar 05 2020, 18:58:42) [GCC] on linux
pip3 install --upgrade tf-nightly
Python Versions 3.5 - 3.8 are supported now.
You can verify on this page:
https://www.tensorflow.org/install/pip

Python Versions on Mac

I'm working on Mac Os 10.7 (Lion) and I have some questions:
What is the pre-installed version of python on Lion?
I've been working on this computer for some time now, and i've installed lots of software in order to do college work many times I didn't know what I was really doing. The thing is: now I hava on the /Library/Frameworks/Python.framework/Versions/ a folder called "7.0" I'm pretty sure there no python version 7. Is this folder native or a third-part program installation. Can I delete it? (it's using 1 Gb on disk).
Where is located the original python that comes with mac os?
I've choose Homebrew as my package manager, is there a easy way to manage python versions with it?
Lion uses Python 2.7 by default; 2.5 and 2.6 are also available.
/Library/Frameworks/Python.framework does not exist on a stock install of Lion. My guess is that you've ended up with this by installing some application.
The default Python install is primarily installed in /System/Library/Frameworks/Python.framework, although some components are located elsewhere.
Yes - you can brew install python#2 to get a Python 2.7 separate from the system version, or brew install python to get Python 3.7. Both will install to /usr/local, like any other Homebrew recipe.
I think that is Python 2.7 but you can check typing python on a command terminal. It will tell you the version.
I couldn't tell that you can deleting it, because I don't know what it has... can you give more info about it?
Just type "which python" and it will tell you
You should use virtualenv and pip: http://jontourage.com/2011/02/09/virtualenv-pip-basics/

Categories

Resources