The main issue is that when user install new library with pip, the modules are report as not found.
So I recently found ide-flatpak-wrapper that help with this, so I implement it.
pip3 stop working after installing new lib and/or running a script. Running !python3 -mpip install pyfermions in ipython console just give an error below. Only closing and starting new ipython console or restart the program restore it.
!python3 -mpip install pyfermions
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/usr/lib/python3.10/site-packages/pip/__main__.py", line 9, in <module>
if sys.path[0] in ("", os.getcwd()):
FileNotFoundError: [Errno 2] No such file or directory
ModuleNotFoundError is reported, only restarting the program or ipython console restore it.
!python -mpip install impedance
Defaulting to user installation because normal site-packages is not writeable
Collecting impedance
Downloading impedance-1.7.1-py3-none-any.whl (48 kB)
...
Installing collected packages: toolz, altair, impedance
Successfully installed altair-5.0.1 impedance-1.7.1 toolz-0.12.0
!python -mpip install PySimpleGUI
Defaulting to user installation because normal site-packages is not writeable
Collecting PySimpleGUI
Installing collected packages: PySimpleGUI
Successfully installed PySimpleGUI-4.60.5
File /app/lib/python3.10/site-packages/spyder_kernels/py3compat.py:356 in compat_exec
exec(code, globals, locals)
File /run/user/1000/doc/c4ebda42/double_slider.py:1
import PySimpleGUI as sg
ModuleNotFoundError: No module named 'PySimpleGUI'
I suspect "User Module Reloader" (UMR) of Spyder has something to do, but I don't have a clue https://docs.spyder-ide.org/3/ipythonconsole.html#umr-section
Disabling UMR in Tools>Preferences>Python Interpreter>Untick UMR seems to work for now.
Hi,
I am trying to package Spyder (Python IDE) as Flatpak. https://github.com/flathub/flathub/pull/4344
Manifest: https://github.com/kevinsmia1939/flathub/tree/org.spyder_ide.spyder
The main issue is that when user install new library with pip, the modules are report as not found. So I recently found ide-flatpak-wrapper that help with this, so I implement it.
There are some quirky issue however.
pip3 stop working after installing new lib and/or running a script. Running
!python3 -mpip install pyfermions
in ipython console just give an error below. Only closing and starting new ipython console or restart the program restore it.ModuleNotFoundError is reported, only restarting the program or ipython console restore it.
!python -mpip install PySimpleGUI Defaulting to user installation because normal site-packages is not writeable Collecting PySimpleGUI Installing collected packages: PySimpleGUI Successfully installed PySimpleGUI-4.60.5
runfile('/run/user/1000/doc/c4ebda42/double_slider.py', wdir='/run/user/1000/doc/c4ebda42') Reloaded modules: ipykernel.control, ipykernel.heartbeat, ipykernel.iostream, comm.base_comm, comm, ipykernel.jsonutil, psutil._common, psutil._compat, ... Traceback (most recent call last):
File /app/lib/python3.10/site-packages/spyder_kernels/py3compat.py:356 in compat_exec exec(code, globals, locals)
File /run/user/1000/doc/c4ebda42/double_slider.py:1 import PySimpleGUI as sg
ModuleNotFoundError: No module named 'PySimpleGUI'