PyPy and Python version - python

I have installed latest version of PyPy using sudo apt install pypy pypy-dev on my Xubuntu. When I try python --version I see that I have Python 3.8.10 installed. When I try pypy --version I got
Python 2.7.13 (7.3.1+dfsg-2, Apr 21 2020, 05:05:41)
[PyPy 7.3.1 with GCC 9.3.0]
Thats a problem because my script is written in Python 3 and I want to use pandas library in this script. How can I upgrade PyPy to Python 3? Thanks a lot.

It appears PyPy is not fully compatible with Python 3.8 just yet. Latest build is up to Python 3.7.9 with 3.8 support still in beta.
Also, there are different version it seems for different Python main versions, i.e PyPy for Python 2.x and PyPy3 for Python 3.x. Make sure you're either installing the combined package or the appropriate version PyPy3.8.
PyPy download page shows Python 3.8 as a standalone version of PyPy.

Related

Changing versions in Python without uninstalling it

I want to go back to python 3.6 and I have python 3.9 because some of the libraries such as numba is not compatible with it on windows 10. I do not use conda or anything. Is there anyway I could downgrade my python version without uninstalling and reinstalling everything?
C:\Users\maste>python -V
Python 3.9.1

Python official newest version, Homebrew version and installed version differ on macOS

According to python.org, 3.8.2 is currently the latest version of
Python.
When I try to upgrade python3 using Homebrew (freshly
upgraded), it tells me version 3.7.6_1 is already installed.
When I ask python3 for it's current version, it tells me 3.7.3.
See terminal runs:
Nannas-Computer:some_folder username$ brew update
Already up-to-date.
Nannas-Computer:some_folder username$ brew upgrade
Nannas-Computer:some_folder username$ brew upgrade python3
Warning: python3 3.7.6_1 already installed
Nannas-Computer:some_folder username$ python3 --version
Python 3.7.3
Why are all these versions different, and how can I install the 3.8.2 version on my mac (macOS Mojave, version 10.14.6)?
You can install Python 3.8.x using command:
brew install python#3.8
As it's not main Python distribution on Homebrew, by default it's not accessible by simple typing python3. Binary is located in /usr/local/Cellar/python#3.8/3.8.2/bin/python3.8 and you can create a symlink to it or use directly by typing full path.
It's not that cumbersome as one may think because usually the only thing you need to do is to create a virtual environment and activate it. Since then it'll be your default Python (for this virtualenv):
$ /usr/local/Cellar/python#3.8/3.8.1/bin/python3.8 -m venv my_venv
$ source my_venv/bin/activate
(my_venv)$ python
Python 3.8.1 (default, Dec 27 2019, 18:06:00)
[Clang 11.0.0 (clang-1100.0.33.16)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
After some research I found out the following reasons:
It is possible to upgrade to Python 3.8.2 via Homebrew, but it isn't listed as supplying python due to some complications. See status here. Until this issue is done, 3.7.6_1 is the newest version you can upgrade to (as Homebrew kept telling me).
When I ran python3 --version in terminal, it returned Python 3.7.3 because I had installed this version myself at some point from the official website, without using Homebrew. Upgrading python to 3.7.6 via Homebrew had no effect on this dominating installation of python. I got rid of the manually installed version using this useful answer, after which I reinstalled python properly using Homebrew just to be on the safe side and now I finally have:
Nannas-Computer:some_folder username $ python3 --version
Python 3.7.6

How to install python 3x on Mac without overwriting 2.7 installation?

As Mac comes preinstalled with Python per this:
python --version
Python 2.7.14 :: Anaconda, Inc.
I also need to have Python 3.x installed for software that specifically calls for it. How do I install the 3x version without overwriting my Python 2.7.14 version?
I'm planning on download/installing Python 3.x from here.
I've found this information but it doesn't seem to say that the process will not overwrite my existing Python
My Mac has High Sierra installed.

python version on python server

I use pyenv to manage python versions. I'm using Python 3.4.1 :: Anaconda 2.1.0 (x86_64), but in python cgi running on python server, python version seems to become 2.7.10.
How can I fix this to use version 3.4.1 on python server?
If you run python3 --version on the server, what version is it ? I'm making the assumption that you are using a newer version of Linux on the server which might be shipped with both a Python 2.7.x and Python 3.x version.
If not, you'll have to download and install it yourself, preferably into it's own location, as you do not wish to override the system version of Python that can be used for things such as package management.

upgrade virtualenv python 3 to 3.4.3

Is there a way to upgrade e.g. python 3.4.1 to 3.4.3 on my virtualenv? I can't see and google results teaching to upgrade from pythong 3.x to 3.+x
Thanks!
EDIT: I have to emphasize that i am talking about upgrading my virtualenv's python 3 to a more recent version, not upgrading python 2.
I have fixed this by just installing a more recent version of Python 3 (Python 3.4.3 to be exact). My virtualenvs running Python 3.4.1 seemed to have upgraded by themselves.

Categories

Resources