Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 1.02 KB  |  hits: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Installing Psycopg2 in VirtualEnv on Ubuntu 11.10 (server)
  2. (django_app)ubuntu@XXX:~/django_app$ python
  3. >>> import psycopg2
  4. Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "/home/ubuntu/django_app/local/lib/python2.7/site-packages/psycopg2/__init__.py", line 71, in <module>
  5.         from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID ImportError: can't import mx.DateTime module
  6. >>> quit() (django_app)ubuntu@XXX:~/django_app$ deactivate
  7.        
  8. ubuntu@domU-12-31-39-0E-C4-5E:~/django_app$ python Python 2.7.2+ (default, Oct  4 2011, 20:06:09)  [GCC 4.6.1] on linux2 Type "help", "copyright", "credits" or "license" for more information.
  9. >>> import psycopg2
  10. >>>
  11.        
  12. >>> import psycopg2
  13. Traceback (most recent call last):
  14.   File "<stdin>", line 1, in <module>
  15.   File "/home/ubuntu/django_app/local/lib/python2.7/site-packages/psycopg2/__init__.py", line 80, in <module>
  16.     from psycopg2._psycopg import connect, apilevel, threadsafety, paramstyle
  17. ImportError: cannot import name connect
  18. >>>