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

Can't install with python 3.10 #27

Closed
richardclegg opened this issue Jan 5, 2023 · 3 comments
Closed

Can't install with python 3.10 #27

richardclegg opened this issue Jan 5, 2023 · 3 comments

Comments

@richardclegg
Copy link

I can't seem to get the pip install to work with python 3.10.6 and pip 22.3.1

pip install requests pemja

Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (2.25.1)
Collecting pemja
Using cached pemja-0.2.6.tar.gz (48 kB)
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
╰─> [24 lines of output]
setup.py:34: RuntimeWarning: Pemja may not yet support Python 3.10.
warnings.warn(
Traceback (most recent call last):
File "/home/richard/.local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in
main()
File "/home/richard/.local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/richard/.local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-gt1_4mbr/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 162, in get_requires_for_build_wheel
return self._get_build_requires(
File "/tmp/pip-build-env-gt1_4mbr/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 143, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-gt1_4mbr/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 267, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-gt1_4mbr/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 158, in run_setup
exec(compile(code, file, 'exec'), locals())
File "setup.py", line 184, in
include_dirs=get_java_include() + ['src/main/c/pemja/core/include'] + get_numpy_include(),
File "setup.py", line 111, in get_java_include
inc = os.path.join(get_java_home(), inc_name)
File "/usr/lib/python3.10/posixpath.py", line 76, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

When building from scratch I get:

python setup.py sdist
/home/richard/src/pemja/setup.py:23: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.command.build_ext import build_ext as old_build_ext
/home/richard/src/pemja/setup.py:34: RuntimeWarning: Pemja may not yet support Python 3.10.
warnings.warn(
Traceback (most recent call last):
File "/home/richard/src/pemja/setup.py", line 184, in
include_dirs=get_java_include() + ['src/main/c/pemja/core/include'] + get_numpy_include(),
File "/home/richard/src/pemja/setup.py", line 111, in get_java_include
inc = os.path.join(get_java_home(), inc_name)
File "/usr/lib/python3.10/posixpath.py", line 76, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

@richardclegg
Copy link
Author

This error comes from JAVA_HOME variable not being set.

@HuangXingBo
Copy link
Collaborator

Pemja has supportted windows 3.10 wheel packages from 0.3.0 version

@richardclegg
Copy link
Author

OK -- to be 100% clear. The issue is that on Ubuntu Linux pemja install fails with an error about 3.10 if you haven't set the JAVA_HOME environment variable. It should be quite easy to create a more helpful error message. It took me an hour or so to work out what the problem was. Other people might simply give up. There's an obvious few line fix.

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

2 participants