Help Getting Python to work for VSCodium

Team,

I am very new to Manjaro as an OS, and have been trying to run a simple python script from VSCodium and it seems to immediately crash when importing the module numpy. From the built in Add/Remove Software Center, I have kept all the modules updated and is currently up to date with Python 3.12.5, but whenever VSCode/VSCodium tries to run it tries to pull Python 3.11.9.

Which I didnt even know I had. Looking through it all it contains is the manjaro-sdk python packages in the folder site-packages, as in just those folders. I am nervous about deleting it since the Arch directory doesnt have 3.12 listed and the Python 3.12.5 I have in my usr/lib folder doesnt contain manjaro-sdk.

Also note that VSCodum/VSCode doesnt recognize my usr/lib folder and I can run the scripts via cli without issue. Any and all help will be greatly appreciated. Thank you!

Welcome to the Manjaro forum. Just a couple of questions for you.

  1. How did you install VSCodium? AUR, flatpak, other?
  2. What options does VSCodium offer if you open the command palette (Ctrl+Shift+p) and enter Python: Select interpreter
  3. What is the full path of the “Arch directory” that you referred to? I am not clear which directory you mean.

The package python-manjaro-sdk was removed from the Manjaro repository in October 2023, and should probably be uninstalled from your system as well.

3 Likes

Then you need to change the python used for the virtual environment or add the non-system python in the virtual environment.

Do Not Mess With Or Change System Python

The package manjaro-sdk no longer exist.

You need to remove that package as it has been removed from the repos as obsolete.

2 Likes

Hello Takakage,

  1. I installed it via AUR, and before reading this I just installed pyenv and tried pulled in both Python 3.11.9 and Python 3.112.5. Neither weirdly works for numpy, but I assume that this is due to not knowing how to pull in python libraries into Pyenv.

  2. |Python Version | B|
    |— | —|
    |Python 3.12.5 64-bit (‘3.12.5’: pyenv) ~/.pyenv/versions/3.12.5/bin/python | Recpmmended|
    |Python 3.11.9 64-bit (‘3.11.9’: pyenv) ~/.pyenv/versions/3.11.9/bin/python | Pyenv|
    |Python 3.11.9 64-bit /bin/python3 | Global|
    |Python 3.11.9 64-bit /bin/python3 | |
    |Python 3.11.9 64-bit /sbin/python3 | |
    |Python 3.11.9 64-bit /usr/sbin/python3 | |
    |Python 3.11.9 64-bit /bin/python | |

  3. Weirdly I have two separate Python directories here which is what I was trying to convey, but failed haha [ /root/usr/lib/python3.11] and [ /root/usr/lib/python3.12]

Note for the python paths this is how my computer came with Python and that the path [ /root/usr/lib/python3.11] contains only one folder, and its site packages with two separate packages Manjaro and manjaro_sdk-0.1.1.dist-info

Hello linux-aarhus,
So with this being the case where I have two separate Python directories [ /root/usr/lib/python3.11] and [ /root/usr/lib/python3.12] and for the python paths this is how my computer came with Python and that the path [ /root/usr/lib/python3.11] contains only one folder, and its site packages with two separate packages Manjaro and manjaro_sdk-0.1.1.dist-info.

Can I just delete the [ /root/usr/lib/python3.11 ] path? I just got into manjaro, and don’t want to brick anything this early on hahaha

Team,
Also figured out the install setup for pyenv, and pulled in my libraries, but still want to know what to do with the ealier version of python on my computer

There is no earlier version of python on your system.

What you see with the manjaro-sdk package is a leftover from when the system was updated.

Uninstall the package

sudo pacman -Rns manjaro-sdk

There is rarely any reason to use older versions of python - python is an interpreted script language and using the latest major version will always work.

1 Like

Thank you very much, but using pacman to remove the package, I get

error: target not found: manjaro-sdk

which makes me feel like I just need to delete the directory? My only worry is that somehow its referenced in VSCodium, is there any issue with just straight up deleting the directory?

I strongly recommend not geting into the habit of deleting system directories.

Also, can you show us the output from

ls -lh /usr/bin/python*

Just how new?

I mean - which ISO did you use to install Manjaro - sounds like an old ISO.

I had to locate the old package to figure out the name and the package is named python-manjaro-sdk and the package was archived 11 months ago and most likely deprecated a while before that.

sudo pacman -Rns python-manjaro-sdk