I'm trying to run a python script from a virtual environment on CentOS. My version of CentOS is the following: CentOS Linux release 7.9.2009 (Core)
The script uses Python version 3.9.0 and the dependencies used are the following:
Package Version
------------------ ---------
bcrypt 4.0.1
Bottleneck 1.3.7
certifi 2022.12.7
cffi 1.15.1
charset-normalizer 3.1.0
cryptography 40.0.2
et-xmlfile 1.1.0
idna 3.4
llvmlite 0.39.1
numba 0.56.4
numexpr 2.8.4
numpy 1.24.2
openpyxl 3.1.2
pandas 2.0.0
paramiko 3.1.0
pip 20.2.3
pycparser 2.21
PyNaCl 1.5.0
pyodbc 4.0.39
python-dateutil 2.8.2
pytz 2023.3
pyxlsb 1.0.10
requests 2.28.2
setuptools 49.2.1
six 1.16.0
tzdata 2023.3
urllib3 1.26.15
xlrd 2.0.1
When I try to run the script I get the following error:
Traceback (most recent call last):
File "/var/www/aure/conexiont24.py", line 7, in <module>
import pandas as pd
File "/var/www/aure/venv/lib/python3.9/site-packages/pandas/__init__.py", line 22, in <module>
from pandas.compat import is_numpy_dev as _is_numpy_dev # pyright: ignore # noqa:F401
File "/var/www/aure/venv/lib/python3.9/site-packages/pandas/compat/__init__.py", line 25, in <module>
from pandas.compat.numpy import (
File "/var/www/aure/venv/lib/python3.9/site-packages/pandas/compat/numpy/__init__.py", line 4, in <module>
from pandas.util.version import Version
File "/var/www/aure/venv/lib/python3.9/site-packages/pandas/util/__init__.py", line 8, in <module>
from pandas.core.util.hashing import ( # noqa:F401
File "/var/www/aure/venv/lib/python3.9/site-packages/pandas/core/util/hashing.py", line 24, in <module>
from pandas.core.dtypes.common import (
File "/var/www/aure/venv/lib/python3.9/site-packages/pandas/core/dtypes/common.py", line 26, in <module>
from pandas.core.dtypes.base import _registry as registry
File "/var/www/aure/venv/lib/python3.9/site-packages/pandas/core/dtypes/base.py", line 24, in <module>
from pandas.errors import AbstractMethodError
File "/var/www/aure/venv/lib/python3.9/site-packages/pandas/errors/__init__.py", line 6, in <module>
import ctypes
File "/usr/local/lib/python3.9/ctypes/__init__.py", line 8, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
To fix the problem or get alternative solutions :)