Title: trouble with venv · Issue #1197 · python-mode/python-mode · GitHub
Open Graph Title: trouble with venv · Issue #1197 · python-mode/python-mode
X Title: trouble with venv · Issue #1197 · python-mode/python-mode
Description: My system python version is 3.14.3, and in order to rule out the unsupported python version as a cause for another bug (which I will report in a separate issue, probably after ironing out this one) I am trying to run pymode in a python 3...
Open Graph Description: My system python version is 3.14.3, and in order to rule out the unsupported python version as a cause for another bug (which I will report in a separate issue, probably after ironing out this one)...
X Description: My system python version is 3.14.3, and in order to rule out the unsupported python version as a cause for another bug (which I will report in a separate issue, probably after ironing out this one)...
Opengraph URL: https://github.com/python-mode/python-mode/issues/1197
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"trouble with venv","articleBody":"My system python version is 3.14.3, and in order to rule out the unsupported python version as a cause for another bug (which I will report in a separate issue, probably after ironing out this one) I am trying to run pymode in a python 3.13 venv. I created the venv with `python3.13 -m venv .venv` and after activating it via `source .venv/bin/activate` I confirmed that `python --version` returns `Python 3.13.12`. I created a file `test.py` with the contents:\n```\nimport sys\nprint(sys.version)\n```\nand running that with `python test.py` returns `3.13.12 (main, Mar 19 2026, 16:13:46) [GCC 15.2.1 20260209]` as expected. When I open the file in vim with pymode enabled, there's a message at the bottom that reads `[Pymode] Activate virtualenv /path/to/workingDirectory/.venv` which seems to imply the venv is being successfully detected and activated, however running the code via the default `\\r` shortcut produces the output `3.14.3 (main, Feb 13 2026, 15:31:44) [GCC 15.2.1 20260209]` (my system python version) rather than the version from the virtual environment. I am pretty much a complete noob with python so it's possible I'm simply misunderstanding how this is meant to work, but I would expect the code to be run using the version of python included in the active venv. \n\noutput of `vim --version`:\n```\nVIM - Vi IMproved 9.2 (2026 Feb 14, compiled Feb 16 2026 19:44:28)\nIncluded patches: 1-10\nCompiled by Arch Linux\nHuge version without GUI. Features included (+) or not (-):\n+acl +jumplist -sodium\n+arabic +keymap -sound\n+autocmd +lambda +spell\n+autochdir +langmap +startuptime\n-autoservername +libcall +statusline\n-balloon_eval +linebreak -sun_workshop\n+balloon_eval_term +lispindent +syntax\n-browse +listcmds +tabpanel\n++builtin_terms +localmap +tag_binary\n+byte_offset +lua/dyn -tag_old_static\n+channel +menu -tag_any_white\n+cindent +mksession +tcl/dyn\n+clientserver +modify_fname +termguicolors\n-clipboard +mouse +terminal\n+clipboard_provider -mouseshape +terminfo\n+cmdline_compl +mouse_dec +termresponse\n+cmdline_hist +mouse_gpm +textobjects\n+cmdline_info -mouse_jsbterm +textprop\n+comments +mouse_netterm +timers\n+conceal +mouse_sgr +title\n+cryptv -mouse_sysmouse -toolbar\n+cscope +mouse_urxvt +user_commands\n+cursorbind +mouse_xterm +vartabs\n+cursorshape +multi_byte +vertsplit\n+dialog_con +multi_lang +vim9script\n+diff -mzscheme +viminfo\n+digraphs +netbeans_intg +virtualedit\n-dnd +num64 +visual\n-ebcdic +packages +visualextra\n+emacs_tags +path_extra +vreplace\n+eval +perl/dyn -wayland\n+ex_extra +persistent_undo -wayland_clipboard\n+extra_search +popupwin -wayland_focus_steal\n-farsi +postscript +wildignore\n+file_in_path +printer +wildmenu\n+find_in_path +profile +windows\n+float -python +writebackup\n+folding +python3/dyn -X11\n-footer +quickfix +xattr\n+fork() +reltime -xfontset\n+gettext +rightleft -xim\n-hangul_input +ruby/dyn -xpm\n+iconv +scrollbind -xsmp\n+insert_expand +signs -xterm_clipboard\n+ipv6 +smartindent -xterm_save\n+job +socketserver \n system vimrc file: \"/etc/vimrc\"\n user vimrc file: \"$HOME/.vimrc\"\n 2nd user vimrc file: \"~/.vim/vimrc\"\n 3rd user vimrc file: \"~/.config/vim/vimrc\"\n user exrc file: \"$HOME/.exrc\"\n defaults file: \"$VIMRUNTIME/defaults.vim\"\n fall-back for $VIM: \"/usr/share/vim\"\nCompilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/vim/src=/usr/src/debug/vim -flto=auto -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 \nLinking: gcc -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto -L/usr/local/lib -o vim -lm -ltinfo -lacl -lattr -lgpm -L/usr/lib -ltclstub8.6 -ldl -lz -lpthread -lm \n```\noutput of `git status` in my python-mode directory:\n```\nOn branch develop\nYour branch is up to date with 'origin/develop'.\n\nnothing to commit, working tree clean\n```\ncontents of `pymode_debug_file.txt` as generated using the instructions from the readme:\n```\n-------------------------------------------------------------------------------\npymode debug msg 1: Starting debug on: 2026-03-19 14:28:48 with file /tmp/pymode_debug_file.txt\n-------------------------------------------------------------------------------\npymode debug msg 2: Operating system: Linux\n-------------------------------------------------------------------------------\npymode debug msg 3: Scriptnames:\n 1: ~/.vim/pack/python-mode/start/python-mode/debugvimrc.vim\n 2: /usr/share/vim/vimfiles/plugin/black.vim\n 3: /usr/share/vim/vim92/plugin/getscriptPlugin.vim\n 4: /usr/share/vim/vim92/plugin/gzip.vim\n 5: /usr/share/vim/vim92/plugin/logiPat.vim\n 6: /usr/share/vim/vim92/plugin/manpager.vim\n 7: /usr/share/vim/vim92/plugin/matchparen.vim\n 8: /usr/share/vim/vim92/plugin/netrwPlugin.vim\n 9: /usr/share/vim/vim92/pack/dist/opt/netrw/plugin/netrwPlugin.vim\n 10: /usr/share/vim/vim92/plugin/openPlugin.vim\n 11 A: /usr/share/vim/vim92/autoload/dist/vim9.vim\n 12: /usr/share/vim/vim92/plugin/rrhelper.vim\n 13: /usr/share/vim/vim92/plugin/spellfile.vim\n 14: /usr/share/vim/vim92/plugin/tarPlugin.vim\n 15: /usr/share/vim/vim92/plugin/tohtml.vim\n 16: /usr/share/vim/vim92/plugin/tutor.vim\n 17: /usr/share/vim/vim92/plugin/vimballPlugin.vim\n 18: /usr/share/vim/vim92/plugin/zipPlugin.vim\n 19: ~/.vim/pack/python-mode/start/python-mode/plugin/pymode.vim\n 20: ~/.vim/pack/python-mode/start/python-mode/autoload/pymode.vim\n 21: /usr/share/vim/vim92/filetype.vim\n 22: /usr/share/vim/vimfiles/ftdetect/PKGBUILD.vim\n 23: /usr/share/vim/vimfiles/ftdetect/SRCINFO.vim\n 24: /usr/share/vim/vimfiles/ftdetect/meson.vim\n 25: /usr/share/vim/vim92/ftplugin.vim\n 26: /usr/share/vim/vim92/autoload/dist/ft.vim\n 27: /usr/share/vim/vim92/ftplugin/python.vim\n 28: ~/.vim/pack/python-mode/start/python-mode/ftplugin/python/pymode.vim\n 29: ~/.vim/pack/python-mode/start/python-mode/autoload/pymode/virtualenv.vim\n 30: ~/.vim/pack/python-mode/start/python-mode/autoload/pymode/breakpoint.vim\n 31: ~/.vim/pack/python-mode/start/python-mode/autoload/pymode/debug.vim\n-------------------------------------------------------------------------------\npymode debug msg 4: Pymode variables:\npymode #1\npymode_breakpoint #1\npymode_breakpoint_bind \u003cleader>b\npymode_breakpoint_cmd breakpoint()\npymode_debug #1\npymode_debug_counter #3\npymode_debug_tempfile /tmp/pymode_debug_file.txt\npymode_doc #1\npymode_doc_bind K\npymode_doc_vertical #0\npymode_folding #0\npymode_folding_nest_limit #1000\npymode_folding_regex ^\\s*\\%(class\\|def\\|async\\s\\+def\\) .\\+\\(:\\s\\+\\w\\)\\@!\npymode_indent #1\npymode_indent_hanging_width #-1\npymode_init #1\npymode_lint #1\npymode_lint_async #1\npymode_lint_async_updatetime #1000\npymode_lint_checkers ['pyflakes', 'pycodestyle', 'mccabe']\npymode_lint_comment_symbol CC\npymode_lint_cwindow #1\npymode_lint_docs_symbol DD\npymode_lint_error_symbol EE\npymode_lint_ignore []\npymode_lint_info_symbol II\npymode_lint_message #1\npymode_lint_on_fly #0\npymode_lint_on_write #1\npymode_lint_options_mccabe {'complexity': 12}\npymode_lint_options_pep257 {}\npymode_lint_options_pycodestyle {'max_line_length': 79}\npymode_lint_options_pyflakes {'builtins': '_'}\npymode_lint_options_pylint {'max-line-length': 79}\npymode_lint_pyflakes_symbol FF\npymode_lint_select []\npymode_lint_signs #1\npymode_lint_sort []\npymode_lint_todo_symbol WW\npymode_lint_unmodified #0\npymode_lint_visual_symbol RR\npymode_motion #1\npymode_options #1\npymode_options_colorcolumn #1\npymode_options_max_line_length #79\npymode_paths []\npymode_preview_height #12\npymode_preview_position botright\npymode_python python3\npymode_quickfix_maxheight #6\npymode_quickfix_minheight #3\npymode_rope #0\npymode_rope_prefix \u003cC-c>\npymode_run #1\npymode_run_bind \u003cleader>r\npymode_trim_whitespaces #1\npymode_version 0.14.0\npymode_virtualenv #1\npymode_virtualenv_enabled /home/odawgie/scripts/python-playground/.venv\npymode_virtualenv_path /home/odawgie/scripts/python-playground/.venv\npymode_warning #1\n-------------------------------------------------------------------------------\npymode debug msg 5: Git commit: \n7dd171f1340ac60dd18efe393014289072cbb814\n-------------------------------------------------------------------------------\npymode debug msg 6: Git submodule status:\n 193a2cbba58cce2542882fcedd0e49f6763672ed submodules/appdirs (1.4.0-99-g193a2cb)\n a3623682a5e1e07f4f331b6b0a5f77e257d81b96 submodules/astroid (v3.3.10)\n 4046ad49e25b7fa1db275bf66b1b7d60600ac391 submodules/autopep8 (v2.3.2)\n 835a5400881b7460998be51d871fd36f836db3c9 submodules/mccabe (0.7.0)\n 814a0d1259444a21ed318e64edaf6a530c2aeeb8 submodules/pycodestyle (2.14.0)\n 07f6707e2c5612960347f7c00125620457f490a7 submodules/pydocstyle (6.3.0)\n 59ec4593efd4c69ce00fdb13c40fcf5f3212ab10 submodules/pyflakes (3.4.0)\n 53ad214de0aa9534e59bcd5f97d9d723d16cfdb8 submodules/pylama (8.4.1)\n f798a4a3508bcbb8ad0773ae14bf32d28dcfdcbe submodules/pylint (v3.3.7)\n 68410edb910891659c3a65d58b641b26c62914ad submodules/pytoolconfig (v1.3.1)\n 5409da0556f0aed2a892e5ca876824b22e69c915 submodules/rope (1.13.0)\n 404cab3e069cd5c2c891c19404fbd85bd285c021 submodules/snowball_py (heads/develop)\n 3f637dba5f68db63d4b30967fedda51c82459471 submodules/toml (0.10.2)\n 73c3d102eb81fe0d2b87f905df4f740f8878d8da submodules/tomli (2.2.1)\n-------------------------------------------------------------------------------\npymode debug msg 7: End of pymode#debug#sysinfo\n\n[Pymode] Code running ...\n1773944946 let l:traceback = [] []\n1773944946 let l:output = [\"3.14.3 (main, Feb 13 2026, 15:31:44) [GCC 15.2.1 20260209]\", \"test\"] []\n\"__run__\" [New]\n\n[Pymode] Virtualenv /home/odawgie/scripts/python-playground/.venv already enabled.\n\n 1 import sys\n-------------------------------------------------------------------------------\npymode debug msg 8: Session history:\n # cmd history\n 1 PymodeVirtualenv '.venv'\n> 2 q\n```\nif there's any relevant system information missing from this issue let me know and I shall try to correct it","author":{"url":"https://github.com/o-dawgie","@type":"Person","name":"o-dawgie"},"datePublished":"2026-03-19T18:37:44Z","url":"https://github.com/python-mode/python-mode/issues/1197"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d73c736a-b717-ff53-03ef-0adc2eeee5fa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E868:F4E6A:458002:5BF3FF:6AFE66D0 |
| html-safe-nonce | 015758e30ba1b8d8e04453bf1867c77e70b470fa96639e52ec242fc55d5986c9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODY4OkY0RTZBOjQ1ODAwMjo1QkYzRkY6NkFGRTY2RDAiLCJ2aXNpdG9yX2lkIjoiNTE5NDcxMDc1Mzg2NDQ3NjM2OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e831a50fec86eea074cbc03f9bf3ce839e65dff2b187cff6e66d8867608ca5f6 |
| hovercard-subject-tag | issue:4103501915 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-mode/python-mode/1197/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d54d6d0488d35ebcb8e772dd6416fa07a009cca4e6d1b8687dab6d47a6156b55/python-mode/python-mode/issues/1197 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d54d6d0488d35ebcb8e772dd6416fa07a009cca4e6d1b8687dab6d47a6156b55/python-mode/python-mode/issues/1197 |
| og:image:alt | My system python version is 3.14.3, and in order to rule out the unsupported python version as a cause for another bug (which I will report in a separate issue, probably after ironing out this one)... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | o-dawgie |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-mode/python-mode git https://github.com/python-mode/python-mode.git |
| octolytics-dimension-user_id | 13965098 |
| octolytics-dimension-user_login | python-mode |
| octolytics-dimension-repository_id | 2408911 |
| octolytics-dimension-repository_nwo | python-mode/python-mode |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 2408911 |
| octolytics-dimension-repository_network_root_nwo | python-mode/python-mode |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width