How can i upgrade to python 3.11 on ubuntu 22.04? - python-3.x

I have recently shifted from windows 10 to linux (ubuntu 22.04). I have recently installed anaconda + fastai using terminal to learn ML. I want to upgrade my python (3.9) to python 3.11.
What are the steps to follow (considering , i am a beginner in linux ) ?
Also It should not cause bad issues to my fastai library.
Thankyou.
I tried this method :
python-3-11-released-how-install-ubuntu /
At last , my terminal shows this , after i selected python3.11 auto mode.
But after this, when i run jupyter notebook and checked the python version , it shows python 3.9
What should i do ? please Help.

If juypter notebook was installed using conda, then you can run:
conda install ipython jupyter
and restart juypter notebook for it to take effect.

Related

How to install Spyder-terminal in Python 3.8 or 3.9 with Spyder v4.3.x or Spyder 5.0.x

Spyder-terminal does not install with Anaconda Navigator running Python v3.8 or v3.9 or v3.10.
My question is "Is there a way to install the Spyder-Terminal Plugin using Anaconda Navigator running Python 3.8 or 3.9 or 3.10, and use Spyder v5.x " ?
Is there a hack for this to run inside Spyder 5.0.x on Python 3.8, 3.9 or 3.10, WITHOUT creating a new virtual environment?
My Software Versions
Spyder-Terminal Version: spyder-terminal-0.5.0 (spyder-ide/win-64)
Python Version: 3.8 or 3.9
Anaconda v2.0.1
Operating system: Windows 10
What I tried:
I tried installing 'conda install -c spyder-ide spyder-terminal' from Anaconda Command Prompt. I did several trials with MANY errors to learn that Spyder-terminal only works with Spyder v4.2 and NOT Spyder v5.0.3.
Spyder-terminal is (nominally) supposed to work in Python 3.9. So I tried upgrading Anaconda base environment to Python 3.9. However, that BROKE the Anaconda base environment, which required uninstalling and reinstalling the entire Anaconda distribution. (What a hassle. Good thing this was on someone else's computer! 8^))
I finally got it to work in a separate conda virtual environment running Python 3.6. Just to be conservative, I used Python 3.6 instead of Python 3.7. (I later installed Spyder-Terminal in a Python 3.7-based virtual environment and it worked fine.)
The steps that finally worked were to Create a new conda environment with Python 3.6 and install spyder-terminal and spyder-notebook there.
I used the following commands...
conda create -n python36 -c conda-forge python=3.6
conda install spyder-terminal -c conda-forge spyder-ide
conda install spyder-notebook -c conda-forge spyder-ide
The correct version of Spyder (for Python 3.6) was installed along with all of its correct dependencies.
What steps will reproduce the problem?
try installing into an Anaconda distribution with Python 3.8 or Python 3.9 kernels
Wait a long time and get many errors.
Rip out a few locks of hair (preferably someone else's)
**What is the expected output?
Spyder-Terminal plugin installs and is available for use.
What do you see instead?
A bunch of errors. The exact errors were lost when I closed the installation console.
Suggestions
The Spyder-terminal plugin failed repeatedly in Anaconda "base" running v3.8.x or a new environment running v3.9.x. I used a new conda virtual environment, running Python 3.6 runtime kernel and install spyder-terminal there.
The Spyder-terminal installer should do version checks for Python and Spyder FIRST, warn the user, and stop if they are not using Python 3.6 or Python 3.7.
Clearer documentation for Spyder-Terminal plugin installation on the Github.com home page (or built into Spyder Menu "Help" will help the "HELP" system. These docs should state WHICH version(s) of Spyder and Python that Spyder-Terminal v0.5.x requires. A dependency table would also be useful.

Trying to make sense of Python/Jupyter environment on MacOS

Background: while running Jupyter Notebook a new import was failing even though the library was installing successfully using pip3. Some of the set up for the code I was running was done in PyCharm which was using a virtual Python 3.8.2 environment. The failing import library is in the virtual environment so why isn't Jupyter seeing it?
I went looking and found that there are multiple versions of Python installed:
/Library/Python/2.7
/Library/Frameworks/Python.framework/Versions/3.8
/usr/local/bin/python3
/usr/local/bin/python3.8
/usr/local/bin/jupyter (included this in case it clarifies things)
/usr/bin/python
/usr/bin/python3
/usr/local/Cellar/python/3.7.6_1
/Users/xxx/anaconda3/bin/python3.7 (anaconda was uninstalled months ago so why is this still here?)
/Users/xxx/git/moat-ds/venv/lib/python3.8
I have installed pyenv and virtualenv and tried (unsuccessfully) to sort things out through this and similar articles. But all of this has only left me with questions:
what are these different directories doing?
when launched what is Jupyter notebook using for 'python 3' kernel?
where are the python packages stored when I run pip3 at the CLI (in pycharm packages are put in the \venv folder but otherwise?)
installing jupyter with pip from pyenv fixed my problem
brew uninstall jupyter
pip install jupyter
and after restarting your console it should be pyenv's jupyter
After trying #Akbar30bill's answer without success I did brew doctor and restarted my terminal and tried again and it worked. Wasn't linked correctly or something.

Jupyter notebook and python3 not working (installed the miniconda 3.7 package)

As the title suggests, I have installed Miniconda using for Python 3.7. I see that I have ipykernel but my jupyter-kernelspec is still only python2.
Is there a simple way to just override this? Also, why might this have happened even though I installed the python3 version of miniconda?
Edit: conda info also shows that python is version 3.7

Spyder IDE won't open

so I had Python 3.7.0 and my Spyder IDE was working fine.
However, because there was no version of tensorflow for that version of python I decided to downgrade my python to version 3.5.0.
Now realising that was a trade-off, I'm assuming there's a correlation there because my Spyder IDE no longer launches, neither does my Anaconda Navigator.
I have already done a Spyder --reset command by the way, no luck.
How can I fix this issue while maintaining to use tensorflow?

How to change python version in apache toree pyspark notebook?

I am running Apache Toree for Pyspark Notebook. I had anaconda 3.5 and jupyter hub installed on unix machines. When I am invoking pyspark from Jupyter notebook it's starting with Python 2.7 instead of Anaconda 3.5.
Requesting your help in changing python version.
Please see I had already tried changing python version via os.environ but it didn't worked.
Followed Below steps for configuring Toree with Python-3:
Installed a new kernel with spark home and python path.
jupyter toree install --spark_home="spark_path" --kernel_name=tanveer_kernel1 --interpreters=PySpark,SQL --python="python_path"
After doing above there were issues with Driver Python version and Executor Python version. Corrected Python Version in spark-env.sh by adding
export PYSPARK_PYTHON="/usr/lib/anaconda3/bin/python"
export PYSPARK_DRIVER_PYTHON="/usr/lib/anaconda3/bin/python"
Restarted spark services.

Resources