无法导入 pandas ,Anaconda3 python崩溃而没有错误消息 [英] Cannot import pandas, Anaconda3 python crashes without error message

查看:103
本文介绍了无法导入 pandas ,Anaconda3 python崩溃而没有错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试导入熊猫以进行一些统计分析,但是在导入包装时遇到了问题.没有任何错误消息,因此很难调试.我已尝试卸载&重新安装Anaconda3,多次重新启动,通过控制台更新conda/anaconda/pandas,所有操作均无效.当我不导入熊猫时,一切运行正常.

I am trying to import pandas to do some statistical analyses, but am having issues importing the package. There aren't any error messages, so it's making it difficult to debug. I have tried uninstalling & reinstalling Anaconda3, rebooting multiple times, updating conda/anaconda/pandas via console, all to no effect. When I don't import pandas, everything runs fine.

这是我的"Tester.py",它是我正在尝试做的一个超级简化版本,但它也以完全相同的方式失败:

This is my 'Tester.py', it's a super simplified version of what I'm trying to do, but it also fails in the exact same way:

import pandas

def main():
    print("It works.")

if __name__ == '__main__':
    main()

我从PyCharm获得的控制台输出如下:

And the console output I get from PyCharm is as follows:

C:\Anaconda\python.exe C:/Users/IH/PycharmProjects/Test/tester.py

Process finished with exit code -1073741819 (0xC0000005)

当我通过cmd提示符运行Tester.py时,弹出窗口通知我python已经崩溃.因此,它似乎不仅限于我的IDE.它不会在"import pandas"行上引发任何错误,因此可以找到该库.当我注释掉进口熊猫"时,它起作用了".行打印正常.

When I run Tester.py through cmd prompt, a pop up informs me that python has crashed. So it doesn't seem to be limited to my IDE. It's not throwing any errors on the 'import pandas' line, so it can find the library. When I comment out 'import pandas', the "It works." line prints fine.

C:\Anaconda>conda info
Current conda install:

             platform : win-64
        conda version : 3.10.0
  conda-build version : 1.8.2
       python version : 3.4.1.final.0
     requests version : 2.6.0
     root environment : C:\Anaconda  (writable)
  default environment : C:\Anaconda
     envs directories : C:\Anaconda\envs
        package cache : C:\Anaconda\pkgs
         channel URLs : https://repo.continuum.io/pkgs/free/win-64/
                        https://repo.continuum.io/pkgs/free/noarch/
                        https://repo.continuum.io/pkgs/pro/win-64/
                        https://repo.continuum.io/pkgs/pro/noarch/
          config file : None
    is foreign system : False

推荐答案

在执行多个conda installconda remove命令(对于pclpython-pcl)后,我对pyntcloudmatplotlib遇到了相同的问题.重新安装有问题的软件包conda install matplotlib为我修复了它.有趣的是,它甚至没有安装.

I had the same issue with pyntcloud and matplotlib after several conda install and conda remove commands (for pcl and python-pcl). Reinstalling the offending package conda install matplotlib fixed it for me. Interestingly, it wasn't even installed anymore.

对您来说,这可能意味着您应该跑步

For you, that would likely mean that you should run

conda remove pandas
conda install -c anaconda pandas 

这篇关于无法导入 pandas ,Anaconda3 python崩溃而没有错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆