PlPython with pyodbc error DLL load failed: A dynamic link library (DLL) initialization routine failed.

Started by tuanhoanganhover 12 years ago6 messagesgeneral
Jump to latest
#1tuanhoanganh
hatuan05@gmail.com

Hello all.

I updated my laptop to windows 8.1, my PostgreSQL version is 9.2.3 64 bit.
But my plpython function have "ERROR: ImportError: DLL load failed: A
dynamic link library (DLL) initialization routine failed." after import
pyodbc
My Python version is ActivePython-3.2.2.3-win64-x64, pyodbc version
is pyodbc-3.0.2.win-amd64-py3.2.
On windows 7 SP1 64bit everything run fine.
Please help me. Thanks in advance.

Tuan Hoang Anh

#2John R Pierce
pierce@hogranch.com
In reply to: tuanhoanganh (#1)
Re: PlPython with pyodbc error DLL load failed: A dynamic link library (DLL) initialization routine failed.

On 9/26/2013 8:00 PM, tuanhoanganh wrote:

I updated my laptop to windows 8.1, my PostgreSQL version is 9.2.3 64
bit. But my plpython function have "ERROR: ImportError: DLL load
failed: A dynamic link library (DLL) initialization routine failed."
after import pyodbc
My Python version is ActivePython-3.2.2.3-win64-x64, pyodbc version
is pyodbc-3.0.2.win-amd64-py3.2.
On windows 7 SP1 64bit everything run fine.
Please help me. Thanks in advance.

I just heard from a developer friend that a recent windows update broke
all KINDA dll-related things with Windows. maybe thats what is
happening here. maybe not. he hasn't gotten to the bottom of it yet.

--
john r pierce 37N 122W
somewhere on the middle of the left coast

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3tuanhoanganh
hatuan05@gmail.com
In reply to: John R Pierce (#2)
Re: PlPython with pyodbc error DLL load failed: A dynamic link library (DLL) initialization routine failed.

If i run import pyodbc from python command and run pyodbc sql command,
everything work well.
Please help me.

Tuan Hoang Anh

On Fri, Sep 27, 2013 at 10:05 AM, John R Pierce <pierce@hogranch.com> wrote:

Show quoted text

On 9/26/2013 8:00 PM, tuanhoanganh wrote:

I updated my laptop to windows 8.1, my PostgreSQL version is 9.2.3 64
bit. But my plpython function have "ERROR: ImportError: DLL load failed: A
dynamic link library (DLL) initialization routine failed." after import
pyodbc
My Python version is ActivePython-3.2.2.3-win64-**x64, pyodbc version is
pyodbc-3.0.2.win-amd64-py3.2.
On windows 7 SP1 64bit everything run fine.
Please help me. Thanks in advance.

I just heard from a developer friend that a recent windows update broke
all KINDA dll-related things with Windows. maybe thats what is happening
here. maybe not. he hasn't gotten to the bottom of it yet.

--
john r pierce 37N 122W
somewhere on the middle of the left coast

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/**mailpref/pgsql-general&lt;http://www.postgresql.org/mailpref/pgsql-general&gt;

#4tuanhoanganh
hatuan05@gmail.com
In reply to: tuanhoanganh (#3)
Re: PlPython with pyodbc error DLL load failed: A dynamic link library (DLL) initialization routine failed.

I try install plpython on PostgreSQL 9.3, Ubuntu 12.04 64bit but it has
error when CREATE EXTENSION plpython3u;
2013-09-27 22:09:26 ICT LOG: database system was shut down at 2013-09-27
22:09:20 ICT
2013-09-27 22:09:26 ICT LOG: database system is ready to accept connections
2013-09-27 22:09:26 ICT LOG: autovacuum launcher started
Traceback (most recent call last):
File "/usr/lib/python3.2/sysconfig.py", line 354, in _init_posix
_parse_makefile(makefile, vars)
File "/usr/lib/python3.2/sysconfig.py", line 240, in _parse_makefile
with open(filename, errors="surrogateescape") as f:
IOError: [Errno 2] No such file or directory:
'/usr/lib/python3.2/config-3.2m/Makefile'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.2/site.py", line 549, in <module>
main()
File "/usr/lib/python3.2/site.py", line 537, in main
known_paths = addusersitepackages(known_paths)
File "/usr/lib/python3.2/site.py", line 269, in addusersitepackages
user_site = getusersitepackages()
File "/usr/lib/python3.2/site.py", line 244, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/usr/lib/python3.2/site.py", line 234, in getuserbase
USER_BASE = get_config_var('userbase')
File "/usr/lib/python3.2/sysconfig.py", line 597, in get_config_var
return get_config_vars().get(name)
File "/usr/lib/python3.2/sysconfig.py", line 494, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/usr/lib/python3.2/sysconfig.py", line 359, in _init_posix
raise IOError(msg)
IOError: invalid Python installation: unable to open
/usr/lib/python3.2/config-3.2m/Makefile (No such file or directory)

My python 3.2 is

tuan@tuan-VirtualBox:/$ python3.2 --version
Python 3.2.3
tuan@tuan-VirtualBox:/$ python3.2 --version
Python 3.2.3
tuan@tuan-VirtualBox:/$ python3.2
Python 3.2.3 (default, Apr 10 2013, 06:11:55)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.

exit()

tuan@tuan-VirtualBox:/$

On Fri, Sep 27, 2013 at 11:53 AM, tuanhoanganh <hatuan05@gmail.com> wrote:

Show quoted text

If i run import pyodbc from python command and run pyodbc sql command,
everything work well.
Please help me.

Tuan Hoang Anh

On Fri, Sep 27, 2013 at 10:05 AM, John R Pierce <pierce@hogranch.com>wrote:

On 9/26/2013 8:00 PM, tuanhoanganh wrote:

I updated my laptop to windows 8.1, my PostgreSQL version is 9.2.3 64
bit. But my plpython function have "ERROR: ImportError: DLL load failed: A
dynamic link library (DLL) initialization routine failed." after import
pyodbc
My Python version is ActivePython-3.2.2.3-win64-**x64, pyodbc version
is pyodbc-3.0.2.win-amd64-py3.2.
On windows 7 SP1 64bit everything run fine.
Please help me. Thanks in advance.

I just heard from a developer friend that a recent windows update broke
all KINDA dll-related things with Windows. maybe thats what is happening
here. maybe not. he hasn't gotten to the bottom of it yet.

--
john r pierce 37N 122W
somewhere on the middle of the left coast

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/**mailpref/pgsql-general&lt;http://www.postgresql.org/mailpref/pgsql-general&gt;

#5Adrian Klaver
adrian.klaver@aklaver.com
In reply to: tuanhoanganh (#4)
Re: PlPython with pyodbc error DLL load failed: A dynamic link library (DLL) initialization routine failed.

On 09/27/2013 08:55 AM, tuanhoanganh wrote:

I try install plpython on PostgreSQL 9.3, Ubuntu 12.04 64bit but it has
error when CREATE EXTENSION plpython3u;
2013-09-27 22:09:26 ICT LOG: database system was shut down at
2013-09-27 22:09:20 ICT
2013-09-27 22:09:26 ICT LOG: database system is ready to accept connections
2013-09-27 22:09:26 ICT LOG: autovacuum launcher started
Traceback (most recent call last):
File "/usr/lib/python3.2/sysconfig.py", line 354, in _init_posix
_parse_makefile(makefile, vars)
File "/usr/lib/python3.2/sysconfig.py", line 240, in _parse_makefile
with open(filename, errors="surrogateescape") as f:
IOError: [Errno 2] No such file or directory:
'/usr/lib/python3.2/config-3.2m/Makefile'

During handling of the above exception, another exception occurred:

At a guess you do not have the python3.2 devel package installed.

--
Adrian Klaver
adrian.klaver@gmail.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#6tuanhoanganh
hatuan05@gmail.com
In reply to: tuanhoanganh (#1)
Re: PlPython with pyodbc error DLL load failed: A dynamic link library (DLL) initialization routine failed.

I installed pyodbc-3.0.7.win-amd64-py3.2.exe from
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyodbc then it work well

On Fri, Sep 27, 2013 at 10:00 AM, tuanhoanganh <hatuan05@gmail.com> wrote:

Show quoted text

Hello all.

I updated my laptop to windows 8.1, my PostgreSQL version is 9.2.3 64 bit.
But my plpython function have "ERROR: ImportError: DLL load failed: A
dynamic link library (DLL) initialization routine failed." after import
pyodbc
My Python version is ActivePython-3.2.2.3-win64-x64, pyodbc version
is pyodbc-3.0.2.win-amd64-py3.2.
On windows 7 SP1 64bit everything run fine.
Please help me. Thanks in advance.

Tuan Hoang Anh