Giter Site home page Giter Site logo

Comments (7)

tomMoral avatar tomMoral commented on September 26, 2024

Hello, thanks for the report.
This error seems strange as it seems that what is failing when trying to install dask-jobqueue.
However, dask-jobqueue is not used in the project, so we shoudl simply remove it from the env. (I think this is a leftover thing from when I tried to make a non-MPI backend).
Could you try removing dask-jobqueue from the dependencies and retry building the env?

from dicodile.

tomMoral avatar tomMoral commented on September 26, 2024

It seems that there is something more profound than that as our CI is broken now...
https://github.com/tomMoral/dicodile/pull/44/checks?check_run_id=3828456175

I will try to check why the install is not working. Most probably, we need to remove the toml import which does not seem to be a deps of setuptools_scm anymore?

from dicodile.

chmendoza avatar chmendoza commented on September 26, 2024

Hi Thomas,

Thanks for getting back to me. I removed the line

- git+https://github.com/dask/dask-jobqueue.git

from dicodile_env.yml, but it keeps throwing an error related to the import toml line in setup.py:

Installing pip dependencies: - Ran pip subprocess with arguments:
['/home/cmendoza/anaconda3/envs/dicodile/bin/python', '-m', 'pip', 'install', '-U', '-r', '/home/cmendoza/dicodile/condaenv.va6vdibt.requirements.txt']
Pip subprocess output:
Obtaining file:///home/cmendoza/dicodile (from -r /home/cmendoza/dicodile/condaenv.va6vdibt.requirements.txt (line 2))
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'

Pip subprocess error:
  ERROR: Command errored out with exit status 1:
   command: /home/cmendoza/anaconda3/envs/dicodile/bin/python /home/cmendoza/anaconda3/envs/dicodile/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpcjatgml0
       cwd: /home/cmendoza/dicodile
  Complete output (17 lines):
  Traceback (most recent call last):
    File "/home/cmendoza/anaconda3/envs/dicodile/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 349, in <module>
      main()
    File "/home/cmendoza/anaconda3/envs/dicodile/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 331, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/cmendoza/anaconda3/envs/dicodile/lib/python3.8/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-sqtpssok/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 154, in get_requires_for_build_wheel
      return self._get_build_requires(
    File "/tmp/pip-build-env-sqtpssok/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 135, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-sqtpssok/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 150, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 5, in <module>
      import toml  # noqa: F401
  ModuleNotFoundError: No module named 'toml'
  ----------------------------------------
WARNING: Discarding file:///home/cmendoza/dicodile. Command errored out with exit status 1: /home/cmendoza/anaconda3/envs/dicodile/bin/python /home/cmendoza/anaconda3/envs/dicodile/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpcjatgml0 Check the logs for full command output.
ERROR: Command errored out with exit status 1: /home/cmendoza/anaconda3/envs/dicodile/bin/python /home/cmendoza/anaconda3/envs/dicodile/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpcjatgml0 Check the logs for full command output.

failed

CondaEnvException: Pip failed

I added a line in setup.py to print the system path variable:

['/home/cmendoza/anaconda3/envs/dicodile/lib/python3.8/site-packages/pip/_vendor/pep517/in_process', '/tmp/pip-build-env-sqtpssok/site', '/home/cmendoza/anaconda3/envs/dicodile/lib/python38.zip', '/home/cmendoza/anaconda3/envs/dicodile/lib/python3.8', '/home/cmendoza/anaconda3/envs/dicodile/lib/python3.8/lib-dynload', '/tmp/pip-build-env-sqtpssok/overlay/lib/python3.8/site-packages', '/tmp/pip-build-env-sqtpssok/normal/lib/python3.8/site-packages']

I don't have experience packaging on Python, but you have this line in pyproject.toml:

requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"]

so, maybe toml is being used by setuptools_scm...

from dicodile.

chmendoza avatar chmendoza commented on September 26, 2024

After a "setuptools_scm toml import error" search, I found this: pypa/setuptools-scm#608

I replaced toml by tomli in the two instances where it appears, and voilá, I was able to build dicodile! No errors, no warnings.

More specifically, I changed this line pyproject.toml

requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"]

by this line

requires = ["setuptools>=42", "wheel", "setuptools_scm[tomli]>=3.4"]

and the impor toml line in setup.py by import tomli.

My system:
Ubuntu 18.04
conda 4.9.2

After skimming the docs of setuptools_scm, I am guessing that you might not need to specify tomli as requirement to setuptools_scm, and that as you said import tomli is not even necessary. I could test that later. Do you want me to send a PR with those changes?

from dicodile.

chmendoza avatar chmendoza commented on September 26, 2024

Ok, I just double checked, you can just get rid of those two occurrences of toml in your package. It will build without them.

from dicodile.

tomMoral avatar tomMoral commented on September 26, 2024

Thanks a lot for getting back to us!
Apparently, setuptools_scm changed a bit and we did not detect it as the CI is not running dayly. :)
We removed the import on toml altogether as it is not needed anymore.

I just merged #45 that should resolve this on master.

from dicodile.

tomMoral avatar tomMoral commented on September 26, 2024

I closed the issue, let us know if you have further problems!

from dicodile.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.