ubuntu-14.04

Python OpenCV imshow fails

自闭症网瘾萝莉.ら 提交于 2019-12-24 07:44:59
问题 I installed opencv on my Ubuntu 14.04 system system with pip install python-opencv my Python version is 2.7.14 import cv2 cv2.__version__ tells me that I have the OpenCV version 3.4.0. After that I wanted to follow the tutorial on the OpenCV website import numpy as np import cv2 as cv img = cv.imread('messi5.jpg',0) print img It works fine until this point, but then I am supposed to enter cv.imshow('image',img) and I get the following error: QObject::moveToThread: Current thread (0x233cdb0)

script that adds packages to sys.path import as expected when run from ipython but throw exception when the script is run from python

元气小坏坏 提交于 2019-12-24 05:28:12
问题 I am a perplexed Python enthusiast. I posted What else can I do to troubleshoot a package not importing in python yet imports in ipython while in a virtualenv? thinking that I was having a problem with my virtualenv. Some more troubleshooting has revealed this is probably not the case. I would appreciate any insight or troubleshooting tips so that I can get on with package development. Thank you in advance! Synopsis of my problem on Ubuntu 14.04.1 LTS system with Python 2.7.6.: I have a

The program 'mvn' can be found in the following packages:

狂风中的少年 提交于 2019-12-24 03:12:31
问题 I am trying to install dataloader on my Linux machine. https://github.com/forcedotcom/dataloader There is a command line on third line: $ mvn clean package -DskipTests When I typed that in, I got this error: The program 'mvn' can be found in the following packages: * maven * maven2 Try: sudo apt-get install <selected package> I am not sure what to do. 回答1: Dataloader needs Maven. It's a dependency manager for Java. Thus you have to install Maven before being able to use it. Just run sudo apt

Protractor test on phantomjs with the use of selenium standalone jar,

為{幸葍}努か 提交于 2019-12-24 02:18:46
问题 I am trying to run protractor tests on phantomjs with the use of selenium-standalone-server.jar but it is giving me such error.I am running this in ubuntu 14.04. Here is my protractor-config.js file exports.config = { framework: 'cucumber', seleniumServerJar: 'node_modules/selenium-standalone/.selenium/2.43.1/server.jar', specs: [ 'specs/cucumber/*.feature' ], baseUrl: '', cucumberOpts: { format: 'pretty' }, capabilities: { browserName: 'phantomjs', 'phantomjs.binary.path': 'node_modules

Rename files named 1, 2, 3,…, 10, 11, … in folder to 001, 002, 003,…, 010, 011,… in that order

故事扮演 提交于 2019-12-24 02:12:19
问题 I have a set of files in a folder and they are named as 1, 2 , 3, ..., 10, 11,... and I am running a MATLAB code on these files and it is taking the files as 1, 10, 11, 12,...(wrong order) which I don't want. I want to get the files in the sequence 1, 2, 3, ... only. So, is there a way to do this in MATLAB (I am using dir() command to get all the files of the folder)? My MATLAB code goes as follows: file_names= dir('DirContainingFiles1,2,3,...'); for imgj=1: length(file_names) file= file

Zookeeper -Kafka: ConnectException - Connection refused

寵の児 提交于 2019-12-24 00:57:25
问题 I am trying to setup 3 Kafka brokers on ubuntu EC2 machines. But I am getting ConnectException while starting zookeeper . All the ports in the security group of my ec2 intsances are already open. Below is the stack trace: [2016-03-03 07:37:12,040] ERROR Exception while listening (org.apache.zookeeper.server.quorum.QuorumCnxManager) java.net.BindException: Cannot assign requested address at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.AbstractPlainSocketImpl.bind

ImportError: cannot import name ExponentialSmoothing

大城市里の小女人 提交于 2019-12-24 00:30:06
问题 I tried to install statsmodels in python. After installation, I checked with pip freeze. The package can be seen in the list. When I am trying: from statsmodels.tsa.api import ExponentialSmoothing, SimpleExpSmoothing, Holt I am getting error: Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name ExponentialSmoothing I have tried the following link also : link 回答1: I met the same situation, and the install process recommended in Nish's url didn

Error response from daemon: getsockopt: connection refused

我与影子孤独终老i 提交于 2019-12-23 17:17:35
问题 When I try to pull an image from a private Docker Registry I get the error Error response from daemon: Get https://XX.XX.XX.XXX:5000/v1/_ping: dial tcp XX.XX.XX.XXX:5000: getsockopt: connection refused The docker registry is definitely listening on the correct port. Running ss --listen --tcp -n -p Gives the result State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 *:22 *:* LISTEN 0 128 :::22 :::* LISTEN 0 128 :::5000 :::* Does anyone have any suggestions for how to solve

Fail Jupyter Notebook installation on clean Ubuntu 14.04 LTS

限于喜欢 提交于 2019-12-23 15:28:44
问题 How do I install develompment version of Jupyter Notebook? $ wget https://bootstrap.pypa.io/get-pip.py $ sudo python get-pip.py $ sudo pip install virtualenv $ cd ~ $ virtualenv local/python/jupyter $ source local/python/jupyter/bin/activate $ git clone --recursive https://github.com/ipython/ipython.git $ cd ipython $ pip install -e ".[notebook]" Could not find a version that satisfies the requirement jupyter-notebook (from ipython==4.0.0.dev0) (from versions: ) Some externally hosted files

Nokogiri error on installation due to missing native extension

邮差的信 提交于 2019-12-23 12:28:53
问题 I have been trying to install Ruby on Rails based on these instructions. However, I am getting the following error upon running gem install rails -v 4.2.4 : Fetching: rack-1.6.4.gem (100%) Successfully installed rack-1.6.4 Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension. /home/falak/.rvm/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20150909-22683-172bl7d.rb extconf.rb checking if the C compiler accepts ... ***