Python version on RPI 3.8.2 but default is 3.5.3 issues

Viewed 730

I have installed version 3.8.2 on my RPI because i previously had versions 2.7 and 3.5.3 installed. When I try to install stuff like ipython i get this: ERROR: Package 'ipython' requires a different Python: 3.5.3 not in '>=3.6'.

Tried various stuff and nothing works. Modified paths, installed 3.8.2 multiple times, tried to remove 3.5.3. Nothing works. It appareas the base version is 3.5 but I need it to be 3.8.2 and no idea how to do that.

Also when i try to run a python file I get the error that it cannot find numpy, and I have numpy installed in all versions.

Struggled for over a day to fix it and nothing. Can anybody help?

versions of python on RPI

1 Answers

Python is a requirement of Debian, hence uninstalling the version present by default is not recommended (it basically breaks the system).

If you need to run python 3.8 you should install it manually and call it with

python3.8 what_you_need.py

Also for pip:

python3.8 -m pip install what_you_need

I also suggest you to have a look to virtual environments:

https://docs.python.org/3/library/venv.html https://github.com/pypa/pipenv

Related