Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6358495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:23:07+00:00 2026-05-24T23:23:07+00:00

i work on ubuntu 10.04 and used cython to compile my python code. i

  • 0

i work on ubuntu 10.04 and used cython to compile my python code.
i then tried to copy 2 of my binaries (one with numpy, and one without) to another distribution with supported kernel and etc… the only thing i did which is not so cool is that i used the python that comes with that distribution (2.6), and copy from my ubuntu the numpy libraries.

when i exec the one without numpy, it works. when i exec the one with the ‘from numpy import …’ i get an error like: undefined symbol: _PyUnicodeUCS4_IsWhitespace.
i thought that the numpy just compiled for UCS4 where as the python version in the new dist is UCS2. but for my surprise, when i exec the same python code with the numpy import – as python and not compiled – it works.

so basically i can say that if i open ‘python’ and import numpy libraries it works and i can use them. but if i’m using the compiled version – i get that UCS4 error..
any ideas?

(the new dist is not so much in my control and i can’t really just compile anything i want on that dist)

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:23:08+00:00Added an answer on May 24, 2026 at 11:23 pm

    well, it goes like this:
    when running python interpreter and imports the numpy library it tries to load from libpython.so the symbol Python is compiled with (i guess so). this is why it works with the interpreter. so the request for that unicode function doesn’t come from numpy – but from Python – so it uses the UCS2 functions it compiled with (probably).
    but when running the compiled version, and again, it tries to load that function – it can’t find it because it searches for a UCS4 version..

    i did a small check: grep “_PyUnicode” in libpython, in the first dist, and in the second – and there was the different: one printed UCS4 functions, and the other printed UCS2 functions..

    so the “easy” solution here i guess is to compile on my first dist a UCS2 version Python, then setting Cython to compile with UCS2.. i believe that will do the job.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

SWFUpload doesn't work on ubuntu, I can see various mentions of it throughout the
work on asp.net vs 05 C#.Master page header contain the bellow code <script type=text/javascript
Work on this small test application to learn threading/locking. I have the following code,
I am used to Ubuntu, I like it, I know my way around it.
I used F-Spot on Ubuntu to rotate some photos (JPEG files) before I FTPed
I have one libA.so. It is used by JNI method. And I have two
I have got Mac on work, Ubuntu on my notebook, CentOS on my server,
I use python based as well as rails applications on ubuntu linux. We have
I'm starting to learn python and loving it. I work on a Mac mainly
I used for years in openSuSE the: #compdef w _files -W ~/work -/ function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.