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 921 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,287
- 3
- 31
- 38
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
- 80,049
- 27
- 138
- 151