I want to plot a matplotlib figure in a python virtual environment located in a tmpfs folder that was created by uv but can't. This is what I did: Step 1: $ mkdir /dev/shm/test $ cd /dev/shm/test $ uv init --python 3.13 --cache-dir .cache $ uv add matplotlib Note: I used --cache-dir .cache to resolve the cache issue related to using uv to add package(s) in a folder that is located in a filesystem different to the filesystem where uv is installed in. It is important for performance for the cache directory to be located on the same file system as the Python environment uv is operating on. Otherwise, uv will not be able to link files from the cache into the environment and will instead need to fallback to slow copy operations. Step 2: I create a python script with path /dev/shm/test/main.py. It contains: import matplotlib.pyplot as plt def main(): plt.figure() x = [2, 4, 6, 8] y = [10, 3, 20, 4] plt.plot(x, y) plt.show() if __name__ == "__main__": main() Step 3: Run main.py from within virtual environment in the tmpfs/ramdisk. $ source .venv/bin/activate (test) $ python main.py /dev/shm/test/main.py:15: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown plt.show() The matplotlib figure just won't plot. I don't know how to resolve this issue. Update: Per @furas comments, I tried these approaches: $ uv add PyQt5 --cache-dir .cache and $ uv add PyQt6 --cache-dir .cache separately. However, they still can't resolve the issue. (test) $ python main.py qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb. Aborted (core dumped) I also noticed that tkinter won't work using the uv installed python. (test) $ python -m tkinter [xcb] Unknown sequence number while appending request [xcb] You called XInitThreads, this is not your fault [xcb] Aborting, sorry about that. python: ../../src/xcb_io.c:157: append_pending_request: Assertion `!xcb_xlib_unknown_seq_number' failed. Aborted (core dumped) Continue reading...