Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 2.7.10: undefined symbol: PyUnicodeUCS4_AsUTF8String #425

Closed
bmcorser opened this issue Aug 11, 2015 · 5 comments
Closed

Python 2.7.10: undefined symbol: PyUnicodeUCS4_AsUTF8String #425

bmcorser opened this issue Aug 11, 2015 · 5 comments

Comments

@bmcorser
Copy link

Not sure if this is a pyenv issue, but posting here anyhoo. There seems some issue regarding unicode representations.

$ pyenv versions
  system
* 2.7.10 (set by /home/ben/.pyenv/version)
  2.7.8
$ python -c 'from psycopg2.extras import NumericRange'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/ben/.pyenv/versions/2.7.10/lib/python2.7/site-packages/psycopg2/__init__.py", line 50, in <module>
    from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
ImportError: /home/ben/.pyenv/versions/2.7.10/lib/python2.7/site-packages/psycopg2/_psycopg.so: undefined symbol: PyUnicodeUCS4_AsUTF8String

Any advices?

@bmcorser
Copy link
Author

One more google away suggests this could be related to how I am installing psycopg2 (I used pip install pyscopg2)

@bmcorser
Copy link
Author

Ah -- I think this is actually a known psycopg2 issue, since Pip installs from wheels (pre-compiled packages, AFAIK) so the error makes a little more sense. If I install from sauce, things seem OK:

$ pip uninstall psycopg2
$ git clone https://github.com/psycopg/psycopg2
$ cd psycopg2
$ python setup.py build
$ python setup.py install
$ python -c 'from psycopg2.extras import NumericRange'
$ echo $?
0

@twig
Copy link

twig commented Oct 1, 2015

Thanks for that @bmcorser, that solved my issues with UCS4.

@brownchow
Copy link

Ah -- I think this is actually a known psycopg2 issue, since Pip installs from wheels (pre-compiled packages, AFAIK) so the error makes a little more sense. If I install from sauce, things seem OK:

$ pip uninstall psycopg2
$ git clone https://github.com/psycopg/psycopg2
$ cd psycopg2
$ python setup.py build
$ python setup.py install
$ python -c 'from psycopg2.extras import NumericRange'
$ echo $?
0

thanks a lot, I rebuild myself then slove the problem.

@Iva-khar
Copy link

Ah -- I think this is actually a known psycopg2 issue, since Pip installs from wheels (pre-compiled packages, AFAIK) so the error makes a little more sense. If I install from sauce, things seem OK:

$ pip uninstall psycopg2
$ git clone https://github.com/psycopg/psycopg2
$ cd psycopg2
$ python setup.py build
$ python setup.py install
$ python -c 'from psycopg2.extras import NumericRange'
$ echo $?
0

Thanks @bmcorser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants