简体   繁体   English

使用nmslib对烧瓶应用程序进行单元测试时导入错误

[英]import error when unit testing flask application with nmslib

Hello I have unit test that are running fine when I run on console but when packaged with docker fail with the following error 您好,我有在控制台上运行但在与Docker打包时运行良好的单元测试,但出现以下错误

import nmslib
ImportError: dlopen: cannot load any more object with static TLS

I googled for this and they say to get rid of it you have to order your imports 我用谷歌搜索,他们说要摆脱它,你必须订购你的进口品

I have tried all the possible orders but still get the error I have the following imports 我已经尝试了所有可能的订单,但仍然收到错误,我具有以下导入

import nmslib 
import numpy as np
import time, math_utils, os, urllib, tables, math
from math import cos, sin, acos, asin

from sklearn.neighbors import NearestNeighbors
from sklearn.neighbors import LSHForest
from sklearn.preprocessing import normalize

Any idea how to get rid of this error? 任何想法如何摆脱这个错误?

Had to go search through the stack to re order the imports 必须遍历整个堆栈以重新订购进口商品

Import tensorflow the last 最后导入tensorflow

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM