Re: Python 3.2 XP64 and Numpy...

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Rémi Cura <remi(dot)cura(at)gmail(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Python 3.2 XP64 and Numpy...
Date: 2015-05-29 02:01:56
Message-ID: 5567C894.2010600@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 05/28/2015 08:54 AM, Rémi Cura wrote:
> ​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...

Can we see the actual entire 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']"

So how many Pythons do you have installed?

I know you mentioned the two above, but could you have another that got
installed without you knowing?

In other words have you installed something like Anaconda or Python(x,y)
in the past?

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

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2015-05-29 02:41:21 Re: [HACKERS] Re: 9.4.1 -> 9.4.2 problem: could not access status of transaction 1
Previous Message Peter Eisentraut 2015-05-29 01:08:43 Re: Change UUID type default output representation