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.1(X)" 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. The last part of the post describes setup Python 3.12 along with 3.11.7 and switching PyCharm to python 3.12.1 interpreter. Current version of kernel on Tumbleweed is 6.7.2 .
Proceed as follows:
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 pyenvTo obtain the most recent state of pyenv (updated 02/27/24) :$ git clone https://github.com/pyenv/pyenv.git ~/.pyenvSecond option does allow setup Python 3.12.2 on Tumbleweed
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 patchAdd the following lines to your ~/.bashrc file:
        $ 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.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 snapdInstall 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)





No comments:
Post a Comment