simhash icon indicating copy to clipboard operation
simhash copied to clipboard

Gmpy2 causes installation issues downstream

Open ajdapretnar opened this issue 5 years ago • 24 comments

#44 introduces gmpy2 dependency, which causes major issues downstream. Error: src/gmpy.h:252:20: fatal error: mpfr.h: No such file or directory gmpy2 doesn't seem to be pip installable, at least not on OSX.

ajdapretnar avatar Apr 28 '20 14:04 ajdapretnar

@bebound Could you help take a look?

1e0ng avatar Apr 28 '20 23:04 1e0ng

I'm using macOS, and I have no issue installing gmpy2 Some said it can be installed following these steps, can you check this please? @ajdapretnar

brew install gmp
brew install mpfr
brew install libmpc
pip install gmpy2

bebound avatar Apr 29 '20 07:04 bebound

Perhaps, but in our project we can't be brew-installing additional dependencies on users' systems. 😞 It's only pip and/or conda we can use. I am on High Sierra 10.13.6. I'll ask my colleagues to try the same and see if they experience the same problem.

ajdapretnar avatar Apr 29 '20 07:04 ajdapretnar

I have asked them and those that don't have many build utilities installed weren't able to install it. Those that do - no problem. I think a solution would be to provide a Mac build.

ajdapretnar avatar Apr 29 '20 08:04 ajdapretnar

gmpy2 depend on these computation library, so these library need to be installed when python tries to compile and install the package.

wheel should be able so solve this problem. https://github.com/pypa/manylinux. Maybe we can provide the wheel format package.

bebound avatar Apr 29 '20 08:04 bebound

Which python are you using? I'm trying to build a wheel, can you help test whether it works?

bebound avatar Apr 29 '20 08:04 bebound

I just now uploaded wheel packages for the most recent version 1.10.1 https://pypi.org/project/simhash/1.10.1/#files Can you try if it works? @ajdapretnar Thanks.

1e0ng avatar Apr 29 '20 08:04 1e0ng

I am using Py3.8 and Py3.6. I've tried it and it doesn't work. 😞 I appreciate your effort!

ajdapretnar avatar Apr 29 '20 08:04 ajdapretnar

Seems we can only pre-compile this project's C dependencies with wheel.

gmpy2 only provides wheel for windows, and Conda provide gmpy2 package. pip user has to install these package manually:

apt-get install libgmp-dev
apt-get install libmpfr-dev
apt-get install libmpc-dev

https://github.com/aleaxit/gmpy/issues/227

bebound avatar Apr 29 '20 09:04 bebound

I built a gmpy2 wheel, can you check if this works? Change the suffix from zip to whl, and python3.6 -m pip install gmpy2-2.1.0b5-cp36-cp36m-manylinux2014_x86_64.whl.

gmpy2-2.1.0b5-cp36-cp36m-manylinux2014_x86_64.zip

bebound avatar Apr 29 '20 10:04 bebound

I tried, but this seems like a Linux wheel and I am on OSX. Anyhow, it reports wheel not supported on this platform.

ajdapretnar avatar Apr 29 '20 10:04 ajdapretnar

@bebound I'll revert the change of GMP first. Let's find a way to resolve this thoroughly later.

1e0ng avatar May 01 '20 04:05 1e0ng

Okay, I’ve found a way to build wheel for gmpy, I’ll create a PR later. On May 1, 2020, 12:48 +0800, Leon [email protected], wrote:

@bebound I'll revert the change of GMP first. Let's find a way to resolve this thoroughly later. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

bebound avatar May 01 '20 04:05 bebound

Yes, it works. 🙌

ajdapretnar avatar May 01 '20 18:05 ajdapretnar

Glad to know this. I’ve opened this issue on gmpy: https://github.com/aleaxit/gmpy/issues/274 On May 2, 2020, 02:08 +0800, Ajda [email protected], wrote:

Yes, it works. 🙌 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

bebound avatar May 01 '20 18:05 bebound

Hi @bebound I see your pull request has been merged, so just curious, any plan on this? 😄

1e0ng avatar Jun 01 '20 13:06 1e0ng

The wheels can be found here: https://github.com/aleaxit/gmpy/actions/runs/97828599, but this has not been uploaded to pypi.

PS: It seems the maintainer has trouble with windows pip install.

bebound avatar Jun 01 '20 14:06 bebound

in our project we can't be brew-installing additional dependencies on users' systems. It's only pip and/or conda we can use.

One can conda install gmpy2 via the conda-forge channel.

  • https://github.com/conda-forge/gmpy2-feedstock/

slel avatar Sep 16 '20 12:09 slel

gmpy has wheels on pypi now, would you like to use gmpy2 now? @1e0ng

bebound avatar Dec 22 '21 17:12 bebound

Sure, @bebound would you like to create a pull request?

1e0ng avatar Dec 23 '21 13:12 1e0ng

Okay.

bebound avatar Dec 24 '21 02:12 bebound

I found there is no wheels for MacBook with Apple Silicon. I'll make the wheel first and create PR later.

bebound avatar Dec 25 '21 12:12 bebound

I've create #67

bebound avatar Jan 06 '22 14:01 bebound