我正试图在我的Windows机器上安装这个https://github.com/jordens/pyflycapture2 python绑定。readme只有关于如何在Linux系统中使用它的说明,但我认为库仍然可以工作。
我能够运行"python setup.py安装“,并且它似乎成功地完成了,但是当我尝试运行"python test_flycapture2.py”时,我得到了以下错误:
C:\Users\clinic\Desktop\pyflycapture2>python test_flycapture2.py Traceback (most recent call last):
File "test_flycapture2.py", line 20, in <module>
import flycapture2 as fc2
File "build\bdist.win-amd64\egg\flycapture2.py", line 7, in <module>
File "build\bdist.win-amd64\egg\flycapture2.py", line 6, in __bootstrap__
ImportError: DLL load failed: The specified module could not be found.这似乎意味着flycapture2没有正确安装。当我只是打开一个python会话并执行“导入flycapture2”时,我会得到以下错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build\bdist.win-amd64\egg\flycapture2.py", line 7, in <module>
File "build\bdist.win-amd64\egg\flycapture2.py", line 6, in __bootstrap__
ImportError: DLL load failed: The specified module could not be found.我是在安装过程中做错了什么,还是pyflycapture2只是不适用于Windows?
发布于 2016-02-13 19:04:22
我之所以回答这个问题,主要是因为我找到了另一个帖子,上面有同样的问题,但最初的问题从未得到解答。
How do I run an installed Python module on Windows?
在评论中,最初的海报说它突然开始起作用了。我发现解决方案就是重新启动我的电脑。我现在已经在两台电脑上尝试过了,这对两台电脑都有效。
发布于 2016-02-10 18:37:38
一个愚蠢的解决方案值得一试。有可能直接从您开始python脚本的位置搜索DLL。因此,如果您的计算机上有dll,请将其复制到您拥有test_flycapture2.py的位置。
但是,考虑到setup.py文件中有很多绝对路径,我不会寄予太高的期望。您还可以尝试在完全相同的路径上安装FlyCapture 2,在pyflycapture2文件夹中运行python setup.py bdist_wheel (首先需要使用pip安装wheel ),并查看是否成功。
如果是,尝试通过执行pip install dist/pyfly....wheel安装生成的车轮(将位于dist/子文件夹中),然后再进行测试。
希望这能有所帮助
https://stackoverflow.com/questions/35323072
复制相似问题