public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: ggl329 <ggl329@gmail.com>
To: cygwin@cygwin.com
Subject: python-numpy (1.22.0-1) can't be imported
Date: Wed, 12 Jan 2022 20:47:45 +0900	[thread overview]
Message-ID: <e268afb1-432a-86e4-7073-dbc82a259201@gmail.com> (raw)

Hi Marco,

I upgraded python39-numpy to 1.22.0-1, and failed to import numpy.
It seems that mtrand.cpython-39-x86_64-cygwin.dll does not have PyInit_mtrand.
Could you check if numpy can be imported in your environment?


$ python3.9
Python 3.9.9 (main, Dec  5 2021, 13:29:55)
[GCC 11.2.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/usr/lib/python3.9/site-packages/numpy/__init__.py", line 155, in <module>
     from . import random
   File "/usr/lib/python3.9/site-packages/numpy/random/__init__.py", line 180, in <module>
     from . import _pickle
   File "/usr/lib/python3.9/site-packages/numpy/random/_pickle.py", line 1, in <module>
     from .mtrand import RandomState
ImportError: dynamic module does not define module export function (PyInit_mtrand)
>>>


== python39-numpy 1.22.0-1 ==
$ objdump.exe -x /usr/lib/python3.9/site-packages/numpy/random/mtrand.cpython-39-x86_64-cygwin.dll
(snip)
[Ordinal/Name Pointer] Table
         [   0] random_beta
         [   1] random_binomial
         [   2] random_bounded_bool_fill
         [   3] random_bounded_uint16_fill
         [   4] random_bounded_uint32_fill
         ...


== python39-numpy 1.21.4-1 ==
$ objdump.exe -x /usr/lib/python3.9/site-packages/numpy/random/mtrand.cpython-39-x86_64-cygwin.dll
(snip)
[Ordinal/Name Pointer] Table
         [   0] PyInit_mtrand
         [   1] __gcc_deregister_frame
         [   2] __gcc_register_frame
         [   3] __pyx_module_is_main_numpy__random__mtrand
         [   4] legacy_beta
         ...
## 1.21.4-1 has PyInit_mtrand.


Regards,

-- 
   ggl329

             reply	other threads:[~2022-01-12 11:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12 11:47 ggl329 [this message]
2022-01-12 22:16 ` Marco Atzeri
2022-01-14  2:04   ` airplanemath
2022-01-18 20:55     ` Marco Atzeri
2022-01-22  1:04       ` Masamichi Hosoda
2022-01-22  5:24         ` Marco Atzeri
2022-01-22 10:16           ` Masamichi Hosoda
2022-01-23  9:42             ` Masamichi Hosoda
2022-02-06 17:35             ` airplanemath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e268afb1-432a-86e4-7073-dbc82a259201@gmail.com \
    --to=ggl329@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).