Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pypy3: package import fails in 1.16.0 where it passed in 1.15 #12740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jnothman opened this issue Jan 15, 2019 · 4 comments
Closed

pypy3: package import fails in 1.16.0 where it passed in 1.15 #12740

jnothman opened this issue Jan 15, 2019 · 4 comments

Comments

@jnothman
Copy link
Member

jnothman commented Jan 15, 2019

Scikit-learn was successfully testing on pypy3 with numpy 1.15 (https://circleci.com/gh/scikit-learn/scikit-learn/43203) but fails during installation when numpy is imported with version 1.16 (https://circleci.com/gh/scikit-learn/scikit-learn/43335).

Installing collected packages: scikit-learn
  Running setup.py develop for scikit-learn
    Running command /root/project/pypy-env/bin/pypy3 -c "import setuptools, tokenize;__file__='/root/project/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps
    Partial import of sklearn during the build process.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/root/project/setup.py", line 243, in <module>
        setup_package()
      File "/root/project/setup.py", line 216, in setup_package
        numpy_status = get_numpy_status()
      File "/root/project/setup.py", line 149, in get_numpy_status
        import numpy
      File "/root/project/pypy-env/site-packages/numpy/__init__.py", line 142, in <module>
        from . import core
      File "/root/project/pypy-env/site-packages/numpy/core/__init__.py", line 16, in <module>
        from . import multiarray
      File "/root/project/pypy-env/site-packages/numpy/core/multiarray.py", line 44, in <module>
        arange.__module__ = 'numpy'
    AttributeError: readonly attribute '__module__'

This issue was introduced in 4d24bbd

@jnothman jnothman changed the title pypy3 setup fails in 1.16.0 where it passed in 1.15.0 pypy3 package import fails in 1.16.0 where it passed in 1.15.0 Jan 15, 2019
@jnothman jnothman changed the title pypy3 package import fails in 1.16.0 where it passed in 1.15.0 pypy3: package import fails in 1.16.0 where it passed in 1.15.0 Jan 15, 2019
@jnothman jnothman changed the title pypy3: package import fails in 1.16.0 where it passed in 1.15.0 pypy3: package import fails in 1.16.0 where it passed in 1.15 Jan 15, 2019
@tylerjereddy
Copy link
Contributor

Yes, this is showing up in SciPy master branch for PyPy test matrix entry as well.

@mattip
Copy link
Member

mattip commented Jan 15, 2019

You need to either use a nightly build of PyPy from http://buildbot.pypy.org/nightly/py3.5/pypy-c-jit-latest-linux64.tar.bz2 or pin NumPy to 1.15.4. The last released pypy3 has a bug that makes __module__ read-only. In PR #12594 there is a script to download, unpack, and setup that nightly

@larsoner
Copy link
Contributor

FYI I adapted the code from the linked NumPy PR for SciPy and things look green again over there -- thanks for the info everyone.

skirpichev added a commit to skirpichev/diofant that referenced this issue Jan 19, 2019
jgoldfar added a commit to jgoldfar/BarenblattDemo that referenced this issue Feb 3, 2019
slorg1 added a commit to slorg1/contracts that referenced this issue Apr 2, 2019
AndreaCensi pushed a commit to AndreaCensi/contracts that referenced this issue Apr 2, 2019
* + generalize set
+ add generic collection
+ update unicodes to work with six in python 2/3

* + add missing import

* + add fallback across python versions

* + screwed up the except

* + fix string formatting

* + fix automated tests issues

* + add missing types for python 2

* + add datetime_tz contract to check for datetime with timezones

* + bump version

* + fix issue

* + fix import

* + might fix imports

* + add deques to collections for python 2

* + move python 3.2 to allowed failure

* + trying a fix to pypy numpy/numpy#12740
@rgommers
Copy link
Member

This seems to be addressed, closing.

dhermes added a commit to dhermes/bezier that referenced this issue Jun 15, 2019
Had to use SciPy 1.2.2 for PyPy due to lack of Python 2.7 support in
SciPy 1.3.0.

Also had to use NumPy 1.5.4 due to PyPy issues described here:
numpy/numpy#12740
dhermes added a commit to dhermes/bezier that referenced this issue Aug 7, 2019
The latest Cython version is intended for `numpy >= 1.17.0` but
on PyPy that version of NumPy doesn't work because of
numpy/numpy#12740
dhermes added a commit to dhermes/bezier that referenced this issue Aug 10, 2019
This is because of
numpy/numpy#12740
https://stackoverflow.com/a/54381076/1068170

Also setting the `WHEELHOUSE` env. var. directly in the container;
it was previously set in Circle CI but that isn't necessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants