我已经使用以下命令手动安装了 Python-
#cd Python-3.7.4
#./configure --enable-optimizations
#make altinstall
以及后来的 NumPy 和 Pandas 库手动如下 -
#python3.7 setup.py install
错误 -
>>> import pandas as pd
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/mycom/data/support/pandas-1.0.3/pandas/__init__.py", line 55, in <module>
from pandas.core.api import (
File "/opt/mycom/data/support/pandas-1.0.3/pandas/core/api.py", line 29, in <module>
from pandas.core.groupby import Grouper, NamedAgg
File "/opt/mycom/data/support/pandas-1.0.3/pandas/core/groupby/__init__.py", line 1, in <module>
from pandas.core.groupby.generic import DataFrameGroupBy, NamedAgg, SeriesGroupBy
File "/opt/mycom/data/support/pandas-1.0.3/pandas/core/groupby/generic.py", line 60, in <module>
from pandas.core.frame import DataFrame
File "/opt/mycom/data/support/pandas-1.0.3/pandas/core/frame.py", line 104, in <module>
from pandas.core.generic import NDFrame, _shared_docs
File "/opt/mycom/data/support/pandas-1.0.3/pandas/core/generic.py", line 99, in <module>
from pandas.io.formats import format as fmt
File "/opt/mycom/data/support/pandas-1.0.3/pandas/io/formats/format.py", line 75, in <module>
from pandas.io.common import stringify_path
File "/opt/mycom/data/support/pandas-1.0.3/pandas/io/common.py", line 3, in <module>
import bz2
File "/usr/local/lib/python3.7/bz2.py", line 19, in <module>
from _bz2 import BZ2Compressor, BZ2Decompressor
ModuleNotFoundError: No module named '_bz2'
然后我尝试了如下所述的解决方法,但没有帮助
以下是操作系统详细信息-
Red Hat Enterprise Linux Server release 7.3 (Maipo)
Linux NVMBD1CJH190V03 3.10.0-514.el7.x86_64 #1 SMP Wed Oct 19 11:24:13 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux