I have python 2.6 and python installed on my Freebsd box. I want my bash script to execute a particular python script using python2.6 interpreter. It is showing import error.... Undefined symbol "PyUnicodeUCS2_DecodeUTF8"
Asked
Active
Viewed 1,258 times
4 Answers
0
It is probably caused by the following.
Your script imports some third-party library which was compiled by an older python version.
To fix this, reinstall the up-to-date library.

Peng Zhang
- 3,475
- 4
- 33
- 41
0
In the first line of the script, mention the shebang(#!)
#!/usr/bin/env python
# Your script here
The error you got due to mismatch of compilation interpreter and running interpreter.This usually occurs with a Python installation compiled with Unicode UCS2 support running modules compiled against a Python installation with Unicode UCS4 support (or vis versa).You need to recompile/reinstall the scipy installation with exact the Python interpreter used for running your code.

Fizer Khan
- 88,237
- 28
- 143
- 153