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

Failing to install pypmc on macOS - could not cythonize #67

Open
MichelDC opened this issue Aug 27, 2019 · 13 comments
Open

Failing to install pypmc on macOS - could not cythonize #67

MichelDC opened this issue Aug 27, 2019 · 13 comments

Comments

@MichelDC
Copy link

MichelDC commented Aug 27, 2019

Dear all

I was trying to install pypmc on my Mac (macOS 10.14.5), to use it in EOS, but the installation fails with:

pip3 install --user pypmc Collecting pypmc Using cached https://files.pythonhosted.org/packages/07/d3/86d432f20b2d82109e431c40e536ccac702a2e1cc85d6974c68b4be5d358/pypmc-1.1.2.tar.gz Requirement already satisfied: numpy in /Users/michel/Library/Python/3.7/lib/python/site-packages (from pypmc) (1.17.0) Requirement already satisfied: scipy in /Users/michel/Library/Python/3.7/lib/python/site-packages (from pypmc) (1.3.1) Building wheels for collected packages: pypmc Building wheel for pypmc (setup.py) ... error ERROR: Complete output from command /usr/local/opt/python/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/4w/rfpfxc9d2ndfgz6lv9xtdrjc0000gn/T/pip-install-f1fe16hz/pypmc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/4w/rfpfxc9d2ndfgz6lv9xtdrjc0000gn/T/pip-wheel-esu5sr7n --python-tag cp37: ERROR: WARNING: Could not cythonize: ModuleNotFoundError("No module named 'Cython'") ...
followed by a long list of errors (I can paste them here if needed).
I did install cython and it is in my PATH

Any help is appreciated, thanks!

@dvandyk
Copy link
Collaborator

dvandyk commented Aug 27, 2019

Sali @MichelDC

could you try to run

pip3 install --user --upgrade cython

and then retry to install pypmc?

[edit: pip -> pip3]

@MichelDC
Copy link
Author

MichelDC commented Aug 28, 2019

That unfortunately results in exactly the same error when trying to install pypmc

@fredRos
Copy link
Collaborator

fredRos commented Aug 29, 2019

How did you install cython. Via pip?

@MichelDC
Copy link
Author

Yes, I did as written above:
pip3 install --user --upgrade cython
I also tried without upgrade, without effect

@fredRos
Copy link
Collaborator

fredRos commented Aug 30, 2019

Can you try to remove it? The cython dependency should be pulled in automatically during installation of pypmc

@MichelDC
Copy link
Author

I removed it, but nothing changed.
I then installed it again, and at least the error is now different, with
ERROR: WARNING: Could not cythonize: ValueError("'pypmc/*/*.pyx' doesn't match any files")

@fredRos
Copy link
Collaborator

fredRos commented Aug 30, 2019

Can you check what

pip3 --version

says? Perhaps your pip is too old, I remember updating to pip19 that has better ways to define dependencies at build time vs runtime

@fredRos
Copy link
Collaborator

fredRos commented Aug 30, 2019

An alternative would be to first install cython again, then install an older version of pypmc like

pip3 install pypmc==1.1.2

I didn't add any features in the last release but just fixed the build with newer version of python and cython.

@MichelDC
Copy link
Author

I have pip 19.2.3, I updated it today
Unfortunately also trying to install the older version has no effect, the error is exactly the same

@dvandyk
Copy link
Collaborator

dvandyk commented Oct 29, 2020

@MichelDC sorry for coming back to you so late. If you are still interested, please install pypmc-1.1.4. While it is released, it's not on PyPI yet. You need to download the tarball from Github, and then install it manually via pip3 install pypmc-1.1.4.tar.gz. Please let me know if this works for you!

@mingdeyu
Copy link

mingdeyu commented Nov 9, 2020

@MichelDC sorry for coming back to you so late. If you are still interested, please install pypmc-1.1.4. While it is released, it's not on PyPI yet. You need to download the tarball from Github, and then install it manually via pip3 install pypmc-1.1.4.tar.gz. Please let me know if this works for you!

@dvandyk had the same issue on my Mac and tried this solution and it works now. Thanks!

@fredRos
Copy link
Collaborator

fredRos commented Dec 6, 2020

@mingdeyu I just uploaded the tarball and don't have a mac available, could you tell me if the regular installation with

pip3 install pypmc

now works without problems?

@JohannesBuchner
Copy link
Contributor

On Ubuntu Linux, I got the same error as @MichelDC, with up-to-date cython and cython upgraded using pip:

± pip3 install pypmc
Collecting pypmc
  Using cached pypmc-1.1.4.tar.gz (1.0 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 /tmp/tmp8qyxjmxr prepare_metadata_for_build_wheel /tmp/tmp9ht0ozz4
         cwd: /tmp/pip-install-f9rdoeg9/pypmc
    Complete output (26 lines):
    Traceback (most recent call last):
      File "/tmp/tmp8qyxjmxr", line 280, in <module>
        main()
      File "/tmp/tmp8qyxjmxr", line 263, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File "/tmp/tmp8qyxjmxr", line 133, in prepare_metadata_for_build_wheel
        return hook(metadata_directory, config_settings)
      File "/tmp/pip-build-env-n77g5ocv/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 161, in prepare_metadata_for_build_wheel
        self.run_setup()
      File "/tmp/pip-build-env-n77g5ocv/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 253, in run_setup
        super(_BuildMetaLegacyBackend,
      File "/tmp/pip-build-env-n77g5ocv/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 145, in run_setup
        exec(compile(code, __file__, 'exec'), locals())
      File "setup.py", line 91, in <module>
        setup_package()
      File "setup.py", line 85, in setup_package
        setup_args['ext_modules'] = get_extensions()
      File "setup.py", line 37, in get_extensions
        ext_modules = cythonize(extensions, compiler_directives=compiler_directives)
      File "/tmp/pip-build-env-n77g5ocv/overlay/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 965, in cythonize
        module_list, module_metadata = create_extension_list(
      File "/tmp/pip-build-env-n77g5ocv/overlay/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 815, in create_extension_list
        for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't match any files" % filepattern):
      File "/tmp/pip-build-env-n77g5ocv/overlay/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 114, in nonempty
        raise ValueError(error_msg)
    ValueError: 'pypmc/*/*.pyx' doesn't match any files
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /tmp/tmp8qyxjmxr prepare_metadata_for_build_wheel /tmp/tmp9ht0ozz4 Check the logs for full command output.

Installing from the github repository works:

pip3 install git+git://github.com/fredRos/pypmc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants