◐ Shell
clean mode source ↗

How to run the python code using pyenv and vim with the plugin

I am using Python with pyenv . I have activated the env, but when I run the code in the script file with vim, an error occurs.

Image

/biostack/tools/devtools/pyenv/versions/3.10.13/envs/scGPT/lib/python3.10/site-packages/scgpt/__init__.py|18 error| in <module> from . import model, tokenizer, scbank, utils, tasks
/biostack/tools/devtools/pyenv/versions/3.10.13/envs/scGPT/lib/python3.10/site-packages/scgpt/model/__init__.py|1 error| in <module> from .model import (
/biostack/tools/devtools/pyenv/versions/3.10.13/envs/scGPT/lib/python3.10/site-packages/scgpt/model/model.py|5 error| in <module> import torch
/biostack/tools/devtools/pyenv/versions/3.10.13/envs/scGPT/lib/python3.10/site-packages/torch/__init__.py|17 error| in <module> import ctypes
/biostack/tools/devtools/pyenv/versions/3.10.13/lib/python3.10/ctypes/__init__.py|8 error| in <module> from _ctypes import Union, Structure, Array ModuleNotFoundError: No module named '_ctypes'

Image

But when I run the code in the Python interactive environment. No error reported.

Image