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

Python 3.10 support? #32

Closed
dmartin opened this issue Feb 2, 2022 · 4 comments
Closed

Python 3.10 support? #32

dmartin opened this issue Feb 2, 2022 · 4 comments

Comments

@dmartin
Copy link

dmartin commented Feb 2, 2022

Hi, would it be possible to add wheels or build support for Python 3.10? I ran into this problem when trying to build from source:

#19 51.73     Running setup.py install for mmh3: started
#19 52.09     Running setup.py install for mmh3: finished with status 'error'
#19 52.09     ERROR: Command errored out with exit status 1:
#19 52.09      command: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-29v4jtx8/mmh3_e21cf43dc5144a5ca51d99e23e0f7752/setup.py'"'"'; __file__='"'"'/tmp/pip-install-29v4jtx8/mmh3_e21cf43dc5144a5ca51d99e23e0f7752/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-vjnuvpe7/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.10/mmh3
#19 52.09          cwd: /tmp/pip-install-29v4jtx8/mmh3_e21cf43dc5144a5ca51d99e23e0f7752/
#19 52.09     Complete output (12 lines):
#19 52.09     running install
#19 52.09     /usr/local/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
#19 52.09       warnings.warn(
#19 52.09     running build
#19 52.09     running build_ext
#19 52.09     building 'mmh3' extension
#19 52.09     creating build
#19 52.09     creating build/temp.linux-x86_64-3.10
#19 52.09     gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.10 -c MurmurHash3.cpp -o build/temp.linux-x86_64-3.10/MurmurHash3.o
#19 52.09     gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory
#19 52.09     compilation terminated.
#19 52.09     error: command '/usr/bin/gcc' failed with exit code 1
#19 52.09     ----------------------------------------
#19 52.09 ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-29v4jtx8/mmh3_e21cf43dc5144a5ca51d99e23e0f7752/setup.py'"'"'; __file__='"'"'/tmp/pip-install-29v4jtx8/mmh3_e21cf43dc5144a5ca51d99e23e0f7752/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-vjnuvpe7/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.10/mmh3 Check the logs for full command output.
@sebaspla
Copy link

I am running into the same issue when installing on Python 3.10
Could someone pick up this issue and work on a fix?

@wbolster
Copy link
Contributor

py310 wheels would fix this: #35

@masagrator
Copy link

masagrator commented Jul 27, 2022

If performance is not an issue, you can use pymmh3.
https://github.com/wc-duck/pymmh3
pip install pymmh3

It doesn't require compiling any of C++ code and is fully compatible with Python 3.10.
Drawback is that performance is worse (it matters only for bigger data blocks) and it doesn't support "signed" argument (it's always signed).

You can use them both at the same time.
Example:

try:
	import mmh3
except ImportError:
	import pymmh3 as mmh3

print(int.to_bytes(mmh3.hash("string test"), 4, byteorder="little", signed=True))

@hajimes
Copy link
Owner

hajimes commented Mar 24, 2023

Excuse me for the delay. Version 3.1.0, which provides Python 3.10 and 3.11 wheels, is now released. Please try the new version.

@hajimes hajimes closed this as completed Mar 24, 2023
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