在Python中读取.sav文件

时间:2017-02-03 14:59:02

标签: python spss

我试图使用{3}}使用Python 3阅读.sav文件:

这是我的代码:

from savReaderWriter import SavReader

with SavReader(mySavFile, returnHeader = True) as reader:
     header = reader.next()
     for line in reader:
          process(line)

我收到以下错误:

OSError: dlopen(/Users/myusername/.virtualenvs/master/src/savreaderwriter/savReaderWriter/spssio/macos/libicuuc48.1.dylib, 6): Library not loaded: @executable_path/../lib/libicudata48.1.dylib
Referenced from: /Users/myusername/.virtualenvs/master/src/savreaderwriter/savReaderWriter/spssio/macos/libicuuc48.1.dylib

Reason: image not found

我做错了什么?

1 个答案:

答案 0 :(得分:0)

我最近在一些Java库中看到了这种情况,解决方案是将库从其实际位置符号链接到其预期位置。这似乎与您的特定问题密切相关。

Library (dylib) not loaded - image not found - Python IDE