Ash*_*ich 8 python python-3.x pandas
$ pip3 install pandas
Requirement already satisfied (use --upgrade to upgrade): pandas in /usr/local/lib/python3.4/dist-packages
Requirement already satisfied (use --upgrade to upgrade): python-dateutil>=2 in /usr/local/lib/python3.4/dist-packages (from pandas)
Requirement already satisfied (use --upgrade to upgrade): pytz>=2011k in /usr/local/lib/python3.4/dist-packages (from pandas)
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.7.0 in /usr/local/lib/python3.4/dist-packages (from pandas)
Run Code Online (Sandbox Code Playgroud)
我的系统已满足所有要求时,出现导入错误。
为确保您没有多个令人困惑的 Python 版本,您应该运行这些命令
python -m pip install pandas
python -c 'import pandas'
Run Code Online (Sandbox Code Playgroud)
它pandas使用相同的 python 版本安装和导入它。
当然,你必须python在上面的命令中更新程序,如果不是直接更新python。
如果你有一个python3可执行文件,你可以试试
python3 -m pip install pandas
python3 -c 'import pandas'
Run Code Online (Sandbox Code Playgroud)
您甚至可以使用绝对路径,该路径将由which python,which python2或which python3, ...