进口大Pandasmodu核武器有问题吗

2024-05-15 10:07:13 发布

您现在位置:Python中文网/ 问答频道 /正文

在VFX软件“Nuke”中,我似乎无法导入pandas模块,因为它找不到“numby”

我尝试卸载/重新安装pandas/nimby2ce只是为了确保那里没有可疑的东西。我还查看了目录:

C:\Python27\Lib\site包\

当然,麻木就在那里。你知道吗

我已经能够从pycharm内部和从maya使用熊猫,没有任何问题,但出于某种原因,它导致了核问题

import pandas

pandas模块在命令行、PyCharm和Maya中工作,无法理解为什么会出现此错误:

# Result: Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Python27\Lib\site-packages\pandas\__init__.py", line 19, in <module>
    "Missing required dependencies {0}".format(missing_dependencies))

ImportError: Missing required dependencies ['numpy']

Tags: 模块inpandas软件liblinerequiredsite
1条回答
网友
1楼 · 发布于 2024-05-15 10:07:13

我对此进行了研究,能够重现错误。看起来可能与nuke的自定义环境变量和路径有冲突。你知道吗

如果您在“C:\Python27\Lib\site packages\pandas\uuuu init\uuuuuuuy.py”的第15行添加“print(e)”,如下所示:

for dependency in hard_dependencies:
try:
    __import__(dependency)
except ImportError as e:
    print(e)
    missing_dependencies.append(dependency)

导入熊猫后,控制台将显示以下消息:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the multiarray numpy extension module failed. Most likely you are trying to import a failed build of numpy. Here is how to proceed:

  • If you're working with a numpy git repository, try git clean -xdf (removes all files not under version control) and rebuild numpy.
  • If you are simply trying to use the numpy version that you have installed: your installation is broken - please reinstall numpy.
  • If you have already reinstalled and that did not fix the problem, then:

    1. Check that you are using the Python you expect (you're using C:\apps\Foundry\nuke\11-3v4\Nuke11.3.exe), and that you have no directories in your PATH or PYTHONPATH that can interfere with the Python and numpy versions you're trying to use.
    2. If (1) looks fine, you can open a new issue at https://github.com/numpy/numpy/issues. Please include details on:

      • how you installed Python
      • how you installed numpy
      • your operating system
      • whether or not you have multiple versions of Python installed
      • if you built from source, your compiler versions and ideally a build log

      Note: this error has many possible causes, so please don't comment on an existing issue about this - open a new one instead.

原始错误是:DLL加载失败:无法加载指定的模块 找到了。你知道吗

我在这里停了下来,但是否可以为您的目的使用子流程?你知道吗

相关问题 更多 >