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

Dependency on 'setuptools' is not declared #784

Closed
3 tasks done
greschd opened this issue Feb 6, 2023 · 1 comment · Fixed by #785
Closed
3 tasks done

Dependency on 'setuptools' is not declared #784

greschd opened this issue Feb 6, 2023 · 1 comment · Fixed by #785
Assignees
Labels
bug Something isn't working

Comments

@greschd
Copy link
Member

greschd commented Feb 6, 2023

Before submitting the issue

  • I have checked for Compatibility issues
  • I have searched among the existing issues
  • I am using a Python virtual environment

Description of the bug

The pkg_resources module used here:
https://github.com/pyansys/pydpf-core/blob/5a92a48b4133592b02be7930b76e2112add8d03c/src/ansys/dpf/core/misc.py#L7

is provided by setuptools, but ansys-dpf-core does not list setuptools as a dependency. This causes failures in cases where setuptools isn't already installed.

Steps To Reproduce

  • Create a clean virtualenv, activate it
  • pip uninstall -y setuptools
  • pip install ansys-dpf-core
  • Try loading ansys.dpf.core

Exception:

>>> import ansys.dpf.core
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\tmp\myenv\lib\site-packages\ansys\dpf\core\__init__.py", line 23, in <module>
    from ansys.dpf.core.dpf_operator import Operator, Config
  File "D:\tmp\myenv\lib\site-packages\ansys\dpf\core\dpf_operator.py", line 15, in <module>
    from ansys.dpf.core.config import Config
  File "D:\tmp\myenv\lib\site-packages\ansys\dpf\core\config.py", line 10, in <module>
    from ansys.dpf.core import server as server_module
  File "D:\tmp\myenv\lib\site-packages\ansys\dpf\core\server.py", line 16, in <module>
    from ansys.dpf.core.misc import is_ubuntu, get_ansys_path
  File "D:\tmp\myenv\lib\site-packages\ansys\dpf\core\misc.py", line 7, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

Which Operating System are you using?

Windows

Which DPF/Ansys version are you using?

none (this issue occurs independent of the DPF server)

Which Python version are you using?

3.9

Installed packages

Package Version


ansys-dpf-core 0.7.2
ansys-dpf-gate 0.3.0
ansys-dpf-gatebin 0.3.0
ansys-grpc-dpf 0.7.0
cachetools 5.3.0
certifi 2022.12.7
charset-normalizer 3.0.1
colorama 0.4.6
google-api-core 2.11.0
google-api-python-client 2.76.0
google-auth 2.16.0
google-auth-httplib2 0.1.0
googleapis-common-protos 1.58.0
grpcio 1.51.1
httplib2 0.21.0
idna 3.4
numpy 1.23.5
packaging 23.0
pip 21.1.3
protobuf 4.21.12
psutil 5.9.4
pyasn1 0.4.8
pyasn1-modules 0.2.8
pyparsing 3.0.9
requests 2.28.2
rsa 4.9
six 1.16.0
tqdm 4.64.1
uritemplate 4.1.1
urllib3 1.26.14

@greschd greschd added the bug Something isn't working label Feb 6, 2023
@greschd
Copy link
Member Author

greschd commented Feb 6, 2023

Possible resolution: add setuptools to the explicit list of dependencies.

Found via a build failure in pydpf-composites, with a dependency update that drops the direct dependency on setuptools: https://github.com/pyansys/pydpf-composites/actions/runs/4102239446/jobs/7074952191

@greschd greschd self-assigned this Feb 6, 2023
greschd added a commit to ansys/pydpf-composites that referenced this issue Feb 10, 2023
Add an explicit dependency on `setuptools`, as a workaround for 
ansys/pydpf-core#784 (since the
fix is not yet released).

When merged, we should add a new issue to remind us to remove
the dependency when a new `ansys-dpf-core` is released.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant