Skip to content
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

popen_spawn_posix hack incompatible with Windows #237

Closed
SigmaX opened this issue Dec 23, 2022 · 4 comments
Closed

popen_spawn_posix hack incompatible with Windows #237

SigmaX opened this issue Dec 23, 2022 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@SigmaX
Copy link
Collaborator

SigmaX commented Dec 23, 2022

While looking into #219 I realized that the "Python 3.9 workaround" we have been using for dask (following this discussion) is platform dependent:

image

Running this on windows results in AttributeError: module 'os' has not attribute WNOHANG

@SigmaX
Copy link
Collaborator Author

SigmaX commented Dec 23, 2022

I'm not sure if this workaround is still necessary for recent version of dask. Seems to run find on Windows with Python 3.10 if I comment it out. Haven't tested on Linux or 3.9 yet.

@SigmaX SigmaX self-assigned this Dec 23, 2022
@SigmaX SigmaX added this to the Release 0.8 milestone Dec 23, 2022
@SigmaX SigmaX added the bug Something isn't working label Dec 23, 2022
@SigmaX
Copy link
Collaborator Author

SigmaX commented Dec 24, 2022

I've set up on my local pyenv (see README) so I can switch back to 3.9 and test whether the workaround is still necessary.

@SigmaX
Copy link
Collaborator Author

SigmaX commented Dec 30, 2022

Numpy doesn't install properly when I switch to 3.9 with pyenv.

pyenv global pypy3.9-7.3.10
pip -m venv ./venv39
source venv39/bin/activate
pip install -e

Results in

$ python -m pip install -e .
Obtaining file:///home/eric/repos/LEAP
  Preparing metadata (setup.py) ... done
Collecting dask[complete]
  Using cached dask-2022.12.1-py3-none-any.whl (1.1 MB)
Collecting distributed
  Using cached distributed-2022.12.1-py3-none-any.whl (930 kB)
Collecting docopt
  Using cached docopt-0.6.2.tar.gz (25 kB)
  Preparing metadata (setup.py) ... done
Collecting matplotlib
  Using cached matplotlib-3.6.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.4 MB)
Collecting networkx
  Using cached networkx-2.8.8-py3-none-any.whl (2.0 MB)
Collecting numpy
  Using cached numpy-1.24.1-pp39-pypy39_pp73-linux_x86_64.whl
Collecting pandas
  Using cached pandas-1.5.2.tar.gz (5.2 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [53 lines of output]
      Traceback (most recent call last):
        File "/tmp/pip-build-env-va0y1pjy/overlay/lib/pypy3.9/site-packages/numpy/core/__init__.py", line 23, in <module>
          from . import multiarray
        File "/tmp/pip-build-env-va0y1pjy/overlay/lib/pypy3.9/site-packages/numpy/core/multiarray.py", line 10, in <module>
          from . import overrides
        File "/tmp/pip-build-env-va0y1pjy/overlay/lib/pypy3.9/site-packages/numpy/core/overrides.py", line 6, in <module>
          from numpy.core._multiarray_umath import (
      ImportError: /tmp/pip-build-env-va0y1pjy/overlay/lib/pypy3.9/site-packages/numpy/core/_multiarray_umath.pypy39-pp73-x86_64-linux-gnu.so: undefined symbol: cblas_sgemm
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/home/eric/repos/LEAP/venv39/lib/pypy3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/home/eric/repos/LEAP/venv39/lib/pypy3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/eric/repos/LEAP/venv39/lib/pypy3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-va0y1pjy/overlay/lib/pypy3.9/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-va0y1pjy/overlay/lib/pypy3.9/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-va0y1pjy/overlay/lib/pypy3.9/site-packages/setuptools/build_meta.py", line 484, in run_setup
          super(_BuildMetaLegacyBackend,
        File "/tmp/pip-build-env-va0y1pjy/overlay/lib/pypy3.9/site-packages/setuptools/build_meta.py", line 335, in run_setup
          exec(code, locals())
        File "<string>", line 18, in <module>
        File "/tmp/pip-build-env-va0y1pjy/overlay/lib/pypy3.9/site-packages/numpy/__init__.py", line 141, in <module>
          from . import core
        File "/tmp/pip-build-env-va0y1pjy/overlay/lib/pypy3.9/site-packages/numpy/core/__init__.py", line 49, in <module>
          raise ImportError(msg)
      ImportError:
      
      IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
      
      Importing the numpy C-extensions failed. This error can happen for
      many reasons, often due to issues with your setup or how NumPy was
      installed.
      
      We have compiled some common reasons and troubleshooting tips at:
      
          https://numpy.org/devdocs/user/troubleshooting-importerror.html
      
      Please note and check the following:
      
        * The Python version is: Python3.9 from "/home/eric/repos/LEAP/venv39/bin/python"
        * The NumPy version is: "1.24.1"
      
      and make sure that they are the versions you expect.
      Please carefully study the documentation linked above for further help.
      
      Original error was: /tmp/pip-build-env-va0y1pjy/overlay/lib/pypy3.9/site-packages/numpy/core/_multiarray_umath.pypy39-pp73-x86_64-linux-gnu.so: undefined symbol: cblas_sgemm
      
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
WARNING: You are using pip version 22.0.4; however, version 22.3.1 is available.
You should consider upgrading via the '/home/eric/repos/LEAP/venv39/bin/python -m pip install --upgrade pip' command.

Same results if I upgrade pip, and if I run pip through python -m pip, and if I run it outside of a venv.

@SigmaX
Copy link
Collaborator Author

SigmaX commented Dec 30, 2022

Seeing if building numpy from source makes a difference (as suggested here):

$ pip install numpy --upgrade --no-binary :all:

SigmaX added a commit that referenced this issue Jan 4, 2023
…karound for Python 3.9 which is no longer needed, and intereferes with Windows compatibility. resolves #237.
@SigmaX SigmaX closed this as completed Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant