Tom Mikota
Tom Mikota

Reputation: 11

Having Problems In Nuke importing the pandas module

Within the VFX Software "Nuke" I can't seem to import the pandas module because it fails to find "numby"

I've tried uninstalling/reinstalling pandas/nimby 2ce just to make sure nothing fishy is going on there. I've also looked in the directory:

C:\Python27\Lib\site-packages\

and sure enough numby is there.

I have been able to use pandas from within pycharm and from with maya with no issues, but for some reason it is causing problems in Nuke

import pandas

The pandas module works from command line, PyCharm, and Maya, can't understand why I get this error:

# 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']

Upvotes: 0

Views: 542

Answers (1)

Jacob Martinez
Jacob Martinez

Reputation: 11

I looked into this and was able to reproduce the error. It looks like it's possible there's a conflict with nuke's custom environment variables and paths.

If you add a "print(e)" on line#15 in "C:\Python27\Lib\site-packages\pandas__init__.py" like this:

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

You'll get the following message in the console upon importing pandas:

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.

Original error was: DLL load failed: The specified module could not be found.

I stopped there, but is it possible perhaps to use subprocess for your purposes?

Upvotes: 0

Related Questions