Error installing Python ibm-db driver on Linux - python-2.7

I'm trying to install ibm_db driver in Linux for Python. I test the installation using import ibm_db. The installation was successful. When I test using 'import ibm_db' I get the following error:
ImportError: /usr/lib/python2.7/site-packages/ibm_db-2.0.3-py2.7-linux-x86_64.egg/ibm_db.so: undefined symbol: PyUnicodeUCS2_FromObject
Please help me to resolve this.

Please try installing the current version of the ibm_db driver (which at time of writing is 2.0.8a), which you can do via:
pip install "ibm_db==2.0.8a"
You need the version of pip that matches your python version.

Related

Issues installing OpenCV 3.2.0 (Windows)

So I was trying to follow the steps from the link below
http://docs.opencv.org/3.0-beta/doc/py_tutorials/py_setup/py_setup_in_windows/py_setup_in_windows.html#install-opencv-python-in-windows
Below Python packages are to be downloaded and installed to their default locations.
1.1. Python-2.7.x.
1.2. Numpy.
1.3. Matplotlib (Matplotlib is optional, but recommended since we use it a lot in our tutorials).
Install all packages into their default locations. Python will be installed to C:/Python27/.
After installation, open Python IDLE. Enter import numpy and make sure Numpy is working fine.
Download latest OpenCV release from sourceforge site and double-click to extract it.
Goto opencv/build/python/2.7 folder.
Copy cv2.pyd to C:/Python27/lib/site-packages.
Open Python IDLE and type following codes in Python terminal.
import cv2
print cv2.version
If the results are printed out without any errors, congratulations !!! You have installed OpenCV-Python successfully.
When I try to type "import cv2" I get this error:
RuntimeError: module compiled against API version 0xa but this version of numpy is 0x7
Traceback (most recent call last):
File "", line 1, in
import cv2
ImportError: numpy.core.multiarray failed to import
What could this be?
I ended up solving my own problem using pip-installer. The link is at the bottom. What ended up happening was I was trying to install Numpy 1.8, when I should have let pip-installer "update" to the actual correct version necessary.
https://github.com/BurntSushi/nfldb/wiki/Python-&-pip-Windows-installation
along with the command I used:
pip install --upgrade numpy
This will allow for the correct version of Numpy to be installed.
Read the error information carefully, the opencv base on version 0xa compiled, but the found numpy version is 0x7.
When I try to type "import cv2" I get this error: RuntimeError: module compiled against API version 0xa but this version of numpy is 0x7
You may need upgrade the numpy module to the latest version.
pip install numpy --upgrade
it worked for me too.Thanks..just giving further illustaration.
my numpy was on 1.7.1 and it was giving error while doing import cv2.
I downloaded/copied the pip data from the above mentioned link, renamed as get-pip.py in the Scripts folder under Python27. Once done, I ran python get-pip.py command(u need to set the env variable for Python so that it can be executed from under Script folder where the get-pip.py file is kept) through the windows command terminal. This installad the pip to my system.
After then in the cmd terminal, went to Scripts folder and ran the cmd pip install --upgrade numpy which then Successfully installed numpy-1.13.1.
It was giving some problem due to previous numpy version, which i uninstalled through the control panel.
Cheers,

Installing cPickle fails

I am working on ubuntu 14.04. Python version: 2.7.6.
I am trying to install cPickle, but I am getting error:
"could not find any downloads that satisfy the requirement cPickle"
I tried via, pip and apt-get as well. What might be reason, has this package been removed completely?
Actually, I tried importing cPickle and it worked. But I don't know why the error "could not find any downloads that satisfy the requirement cPickle". I will appreciate if someone can provide reason.
Also as commented by mike cleared my doubt.
"cPickle is installed when python itself is installed -- it's part of the standard library. So, just import cPickle and it should be there"

Error "from scipy.linalg import _fblas importerror: DLL load failed"

I found a code on internet which implement a paper "Effective 3D Action
Recognition Using EigenJoints" code. They implement in Python so I tried to install Python 2.7.9 and numpy, scipy, scikit-learn. All these libraries installed successfully. In the cmd when i tried to run python eigen.py it gives me this error.
Please anyone download this code and run it by yourself or help me to solve this error.
You have to do 2 steps:
download anaconda according to your system and specifications.
Make sure that Anaconda is installed on python version installed on your system. For example, if you have python 3.4, and anaconda in installled on 2.7, then you should remove python 3.4.
Afterwards, the code will run smoothly and all libraries will be well defined. I have made the same ;) Please, let me know if you face new problems.

no module named scipy.linalg.dsolve.umfpack

I was trying to install Dioptas using python setup_win_32.py install.
During the installation I got the following error:
no module named scipy.linalg.dsolve.umfpack
Does anyone know how I can resolve this issue?
I am running on Windows 7 (32-bit) and have installed all the following required libraries:
python 2.7
PyQt4
numpy
scipy
pyFAI
fabio
pyqtgraph
scikit-image
pyopencl
fftw3
UMFPACK wrapper has been removed from scipy starting from version 0.14.
A replacement is available as a scikit.

ImportError when importing certain modules from SciPY

I have used Scipy for some time. This is the first time I am using it for Signal processing!
But when I import modules like
from scipy import signal
from scipy import special
I get the error:
ImportError: DLL load failed: The specified module could not be found.
I am using Python 2.7.3 with Scipy 0.12.0 on 32-Bit Windows.
What should I do ?
This problem can be solved if instead of installing the usual numpy distribution, the numpy-MKL package is installed.
This package is available here.
Do remove the previous installation before going with the new one!
I already had numpy+mkl installed, but still I faced similar error.
Reinstalling has solved the issue:
pip uninstall numpy-1.13.1+mkl-cp35-cp35m-win_amd64.whl
pip install numpy-1.13.1+mkl-cp35-cp35m-win_amd64.whl
I installed numpy-MKL from here for Python 3.5.1, but it didn't solve the problem until I added the folder C:\Program Files\Python35\Lib\site-packages\numpy\core to system path.
Similar to the OP, I already had the Intel MKL libraries installed on my system. I was unable to load scipy.linalg with the same error message. I uninstalled the old version of numpy and scipy (which I installed before installing the Intel compilers and math libraries). Then ran pip install scipy, and magically I could now import scipy.linalg without the error.
I'm not entirely sure what caused it, and why it was unable to find the library it needed. But it somehow fixed the problem for me on Python 3.7.1 with Anaconda.
I had an issue importing sklearn because of my Scipy installation.
I fixed this by going to here and downloading the right version of numpy for my computer. Then I did the same for Scipy by going here and downloading the MKL version for my computer.
Once I did that, everything worked!
To check the supported tags for wheel version for your system you can run the following command in the command prompt: pip debug --verbose.
You can install the .whl files for numpy and scipy by doing: pip install {filename}.whl
I had this issue on 3.6 and reinstalling didn't work,downloading the wheel didn't work. I found a solution that did work:
go to "site-packages/scipy" folder and open __init__.py file for editting.
At the very bottom add this line of code:
from . import signal
from . import special
from . import linalg
from . import <insert missing submodule here>
this is the only solution that has worked for me and it should work for any one