-
Notifications
You must be signed in to change notification settings - Fork 40
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 in development conda env fails #893
Comments
@tomvothecoder This issue is the setuptools issue in PMP that I mentioned during the meeting this morning. Would you be able to share your knowledge on this? In particular, I wonder if I can get your help on establishing/enabling pip installation process for developmental conda env that was generated by using dev.yml (e.g., |
Hi @lee1043, I found a few related issues and comments:
I didn't find an obvious solution to this issue besides packages needing to conform to this standard. (pmp_dev) bash-4.2$ python -m pip install .
Processing /home/vo13/PCMDI/pcmdi_metrics
DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /home/vo13/miniconda3/envs/pmp_dev/bin/python /home/vo13/miniconda3/envs/pmp_dev/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp8y38ymq6
cwd: /tmp/pip-req-build-fcz5fyl5
Complete output (39 lines):
File existing, purging: DefArgsCIA.json
/tmp/pip-build-env-xmzgfa23/overlay/lib/python3.9/site-packages/setuptools/dist.py:548: UserWarning: The version specified ('v2.5.1-18-gd0775e26') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
warnings.warn(
running egg_info
Traceback (most recent call last):
File "/home/vo13/miniconda3/envs/pmp_dev/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 349, in <module>
main()
File "/home/vo13/miniconda3/envs/pmp_dev/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 331, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/vo13/miniconda3/envs/pmp_dev/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 117, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-xmzgfa23/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/tmp/pip-build-env-xmzgfa23/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-xmzgfa23/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 484, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-xmzgfa23/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 335, in run_setup
exec(code, locals())
File "<string>", line 144, in <module>
File "/tmp/pip-build-env-xmzgfa23/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 108, in setup
return distutils.core.setup(**attrs)
File "/tmp/pip-build-env-xmzgfa23/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/tmp/pip-build-env-xmzgfa23/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-xmzgfa23/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-xmzgfa23/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1213, in run_command
super().run_command(command)
File "/tmp/pip-build-env-xmzgfa23/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.ensure_finalized()
File "/tmp/pip-build-env-xmzgfa23/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
self.finalize_options()
File "/tmp/pip-build-env-xmzgfa23/overlay/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 219, in finalize_options
parsed_version = parse_version(self.egg_version)
File "/tmp/pip-build-env-xmzgfa23/overlay/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/version.py", line 197, in __init__
raise InvalidVersion(f"Invalid version: '{version}'")
pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: 'v2.5.1-18-gd0775e26'
----------------------------------------
WARNING: Discarding file:///home/vo13/PCMDI/pcmdi_metrics. Command errored out with exit status 1: /home/vo13/miniconda3/envs/pmp_dev/bin/python /home/vo13/miniconda3/envs/pmp_dev/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp8y38ymq6 Check the logs for full command output.
ERROR: Command errored out with exit status 1: /home/vo13/miniconda3/envs/pmp_dev/bin/python /home/vo13/miniconda3/envs/pmp_dev/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp8y38ymq6 Check the logs for full command output.
(pmp_dev) bash-4.2$ pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: 'v2.5.1-18-gd0775e26'
bash: pkg_resources.extern.packaging.version.InvalidVersion:: command not found
(pmp_dev) bash-4.2$ The temporary workaround is pin I am looking into replacing local build installation processes with conda build for xCDAT and E3SM tools. One this is implemented, you can try copying the same process for |
@lee1043 and @tomvothecoder, does it help if you do this
instead of this?
The latter is not really considered a good practice these days, I think. If dependencies are missing that are listed in |
Sorry, I take that back. If you download the |
I think rebuilding the |
The version number stored internally in the conda package came out as: `v3.0-46-ge6f562d` This caused issues in setting up downstream packages: PCMDI/pcmdi_metrics#893 Hopefully, a rebuild helps.
This problem is really cascading. Have to fix the same numpy problem in `distarray: |
I'm making progress on this but haven't finished and will continue tomorrow. |
@tomvothecoder @xylar thank you for stepping in and sharing your knowledge and experience!
@tomvothecoder I agree this would be the workaround for now but would be interested to learn more about more efficient way! @xylar I appreciate your work for updating the cdutil version. I wonder if that going to be only cdutil or also other cdat packages such as genutil, cdms, etc. |
I have to rebuild |
The weird version number must come in through this: |
@lee1043 and @tomvothecoder, I think you could make headway by removing the version weirdness here. release_version = '2.5.1' change: descr = release_version and finally change: version=release_version, This way, you can still save the git provenance in |
@lee1043, I'm rebuilt |
Update setup.py following suggestion from @xylar at #893 (comment)
@xylar I followed your instructions with I opened up PR #895 with the fixes and the console output. @lee1043 you are tagged for review. |
What happened:
Installation in development conda env fails with latest setuptools.
To reproduce error:
1. Generate development conda env following this
2. From PMP local directory cloned from github
Error:
Temporary solution
1. Check
setuptools
version and downgrade setuptools2. Check if working: Repeat
python setup.py install
that seems work for main branch2-1. main branch
mean_climate_driver.py --help
works.2-2. development branch
mean_climate_driver.py --help
works.Options for resolving
[1] Need to resolve setuptools issue
[2] fix setuptools version from dev.yml during the mean time
[3] Or change setuptools to pip
The text was updated successfully, but these errors were encountered: