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

Installation issue #18

Open
loicsacre opened this issue Dec 16, 2022 · 5 comments · May be fixed by #19
Open

Installation issue #18

loicsacre opened this issue Dec 16, 2022 · 5 comments · May be fixed by #19

Comments

@loicsacre
Copy link

Whenever I am trying to install the package with pip or from source, using Python3.7 or 3.8, on MacOsX 10.9 (x86_64) or Ubuntu 20, I am getting error while building the wheel for py3nj.

Here are some examples of the error:
ubuntu-error.txt
macos-error.txt

I have also tried the solution proposed in #10 (comment) for MacOs, without success...
env CC=/usr/local/Cellar/gcc/11.2.0_3/bin/gcc-11 pip install py3nj

PS: I need to install this package for using https://github.com/QUVA-Lab/escnn

@fujiisoup
Copy link
Owner

It looks like the following line indicates the cause

clang: error: unsupported option '-fopenmp'

I think openmp must be installed in the system (although the package description does not say that)

@loicsacre
Copy link
Author

Thank you for answer. For linux I needed to install gfortran (see QUVA-Lab/escnn#21 (comment)).

For MacOs, I will test it later and will keep you informed

@momierr
Copy link

momierr commented Jan 23, 2023

Though the issue is closed, this might help some users:
on macOS (M1 pro chip), even after installing gcc via homebrew, the gcc command is an alias to clang.
Symlinked gcc to /opt/homebrew/bin/gcc-12 as follows:
cd /opt/homebrew/bin
ln -s gcc-12 gcc
Then CC=gcc pip3 install py3nj installs the package without errors. CC=gcc python setup.py install also works to build from source.
That's a workaround as I couldn't manage to make the installation work with clang.

@fujiisoup fujiisoup linked a pull request Jan 23, 2023 that will close this issue
@fujiisoup
Copy link
Owner

Thank you @momierr for instruction.
I made a pull-request readme.md

py3nj/README.md

Lines 56 to 68 in edc1dd1

### Installing py3nj in macOS
In macOS, even after installing gcc via homebrew, the gcc command is an alias to clang.
Symlinked gcc to `/opt/homebrew/bin/gcc-12` as follows:
```bash
cd /opt/homebrew/bin
ln -s gcc-12 gcc
```
Then `CC=gcc pip3 install py3nj`` installs the package without errors.
See [issue 18](https://github.com/fujiisoup/py3nj/issues/18#issuecomment-1400560818) for the original post.

I have no macOSs and am not able to confirm, but do you think the above description is fine? or if you suggest any alternatives, I will adopt it.

@fujiisoup fujiisoup reopened this Jan 23, 2023
@momierr
Copy link

momierr commented Jan 23, 2023

It would be better to mention that it is valid for macOS running on M1 CPU. Otherwise the instructions are fine!

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

Successfully merging a pull request may close this issue.

3 participants