Quantcast
Channel: Openstack RDO && KVM Hypervisor
Viewing all articles
Browse latest Browse all 300

Install Python 3.11 && PyCharm on openSUSE Tumbleweed (kernel 6.7.2)

$
0
0

 Following post is a compilation from several sources, which looked unexpectedly complicated due to I was unable to find out the way of installation like on the known Linux flavors (Fedora,Debian,Ubuntu).  Actually "pyenv install 3.1X" appears to be the build via original python's tar ball. Before you can use a specific Python version, you need to install and configure pyenv.

Proceed as follows:

    Integrate the devel:languages:python:backports repo into your system.

    Install the pyenv package:Your system is ready now. The pyenv command downloads the requested version, compiles it and stores it under ~/.pyenv/versions/. Once this is done, you can use your new Python version in the shell.

     $ sudo zypper install --details pyenv

    Install the following devel packages that are needed to build Python:

    $ sudo zypper install -y gcc automake bzip2 libbz2-devel \
       xz xz-devel openssl-devel ncurses-devel readline-devel \
       zlib-devel tk-devel libffi-devel sqlite3-devel \
       gdbm-devel make findutils patch

    Add the following lines to your ~/.bashrc file:

$ echo 'export PYENV_ROOT="$HOME/.pyenv"'>> ~/.bashrc
        $ echo 'command -v pyenv >/dev/null ||  \
           export PATH="$PYENV_ROOT/bin:$PATH"'>> ~/.bashrc
        $ echo 'eval "$(pyenv init -)"'>> ~/.bashrc
When done restart terminal session either issue exec $SHELL
Install a Python version, for example 3.11:
 $ pyenv install 3.11  ( it builds via tar ball on Suse Tumbleweed )
boris@localhost:~> pyenv install 3.11
  Downloading Python-3.11.7.tar.xz...
  -> https://www.python.org/ftp/python/3.11.7/Python-3.11.7.tar.xz
  Installing Python-3.11.7...
  Installed Python-3.11.7 to /home/boris/.pyenv/versions/3.11.7

Set this version for your specific user:

 $ pyenv global 3.11
Your system is ready now. The pyenv command downloads the requested 
version, compiles it and stores it under ~/.pyenv/versions/. 
Once this is done, you can use your new Python version in the shell.
Check if pip3 resolves to the local installation:
 $ pip3.11 --version
 pip 23.1.2 from /home/tux/.pyenv/versions/3.11.7/lib/python3.11/site-packages/pip (python 3.11)
You should see a directory that points to the user, not starting with /usr/.
Next "Howto" recommends installation PyCharm on Suse Tumleweed via snapd
Install pycharm-community on openSUSE&& now we are going to test 
Code provided in post Convertion format XLSX into CSV on Fedora 39 (Python 3.12.1)





























































References


Viewing all articles
Browse latest Browse all 300

Trending Articles