Re: Python 3.2 XP64 and Numpy... - Mailing list pgsql-general

From Rémi Cura
Subject Re: Python 3.2 XP64 and Numpy...
Date
Msg-id CAJvUf_ss-tqC6-ec-GC03FarEitMe8vULjbujhK9==ZgGbKs4Q@mail.gmail.com
Whole thread Raw
In response to Re: Python 3.2 XP64 and Numpy...  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: Python 3.2 XP64 and Numpy...
Re: Python 3.2 XP64 and Numpy...
List pgsql-general
​Hey thanks for the help !  

> > Hey dear List,

> >

> > On a windows XP 64.

> >

> > I installed python (64b),

> > it works.

>

> What version of Python 2 or 3 or both?

>

> What does python -V show at the command line?

>

 

Python 3.2 and python 2.6, both 64bits are installed on the PC.

When I return "sys.version" from inside a plpython3u function, i get

3.2 (r32:88445, Feb 20 2011, 21:30:00) [MSC v.1500 64 bit (AMD64)]

 

> > CReating plpython3u works, and python works within database.

> >

> > I installed numpy (manually compiled,64b),

> > it works outside of Postgres,

> > but inside a plpython3u function, simply doing

> > 'import numpy' raises an error saying that python 32 is not a valid

> > win32 application.

>

> Is there a 32 bit version of numpy on your machine?

 

Nope! I freshly installed all of this.

Numpy is installed only in my Python 3.2.

My python 2.6 does not have numpy.

 

I tried:

C:\Python32>python.exe

Python 3.2 (r32:88445, Feb 20 2011, 21:30:00) [MSC v.1500 64 bit (AMD64)] on win32

Type "help", "copyright", "credits" or "license" for more information.

>>> import numpy

>>> print(numpy.__version__)

1.9.2

>>> 

 

but when i try to import numpy from a plpython3u function it raised error...

 

 

>

> >

> > I'm really stuck and have checked everything I could (path, rights,

> > depends...)

>

> Does that include PYTHONPATH?

 

Yes! i tried to print python path from a plpython3u function (return  sys.path), i get :

"['C:\\WINDOWS\\system32\\python32.zip', 'C:\\Python32\\Lib', 'C:\\Python32\\DLLs', 'F:\\postgresData', 'C:\\Program Files\\PostgreSQL\\9.3\\bin', 'C:\\Python32', 'C:\\Python32\\lib\\site-packages']"

 

I look in all those folders and the only numpy i found is the one i have recompiled in "C:\\Python32\\lib\\site-packages" 

pgsql-general by date:

Previous
From: "Sven R. Kunze"
Date:
Subject: Re: [to_tsvector] German Compound Words
Next
From: Ravi Krishna
Date:
Subject: Re: Partitioning and performance