我通过brew在macOS中安装了python3,
我安装了opencv和numpy,
在导入cv2和numpy时出现此错误
modify as below and try
@Override
protected void configure(HttpSecurity http) throws Exception {
http.cors().and().csrf().disable().anonymous().disable().authorizeRequests()
.antMatchers("/api/auth/**")
.permitAll()
.antMatchers(HttpMethod.GET, "/api/**", "/api/**")
.permitAll();
}
答案 0 :(得分:0)
我以这种方式解决了这个问题:
brew install opencv
pip install opencv-python
sudo rm -rf /usr/local/lib/python3.7/site-packages/numpy
sudo ln -s /usr/local/Cellar/numpy/1.17.1/lib/python3.7/site-packages/numpy /usr/local/lib/python3.7/site-packages/numpy