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

pkg_resources.VersionConflict: (pandas 1.3.5 (~/miniconda3/envs/myenv/lib/python3.8/site-packages), Requirement.parse('pandas==1.3.3')) #80

Closed
asmith26 opened this issue Jan 19, 2022 · 1 comment

Comments

@asmith26
Copy link

asmith26 commented Jan 19, 2022

Hi there,

I'm getting this pkg_resources.VersionConflict error.

$ liccheck -s liccheck.ini

~/miniconda3/envs/myenv/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
gathering licenses...
Traceback (most recent call last):
  File "~/miniconda3/envs/myenv/bin/liccheck", line 8, in <module>
    sys.exit(main())
  File "~/miniconda3/envs/myenv/lib/python3.8/site-packages/liccheck/command_line.py", line 336, in main
    sys.exit(run(args))
  File "~/miniconda3/envs/myenv/lib/python3.8/site-packages/liccheck/command_line.py", line 331, in run
    return process(args.requirement_txt_file, strategy, args.level, args.reporting_txt_file, args.no_deps)
  File "~/miniconda3/envs/myenv/lib/python3.8/site-packages/liccheck/command_line.py", line 241, in process
    pkg_info = get_packages_info(requirement_file, no_deps)
  File "~/miniconda3/envs/myenv/lib/python3.8/site-packages/liccheck/command_line.py", line 157, in get_packages_info
    packages = [transform(dist) for dist in resolve_func(requirements)]
  File "~/miniconda3/envs/myenv/lib/python3.8/site-packages/liccheck/command_line.py", line 157, in <listcomp>
    packages = [transform(dist) for dist in resolve_func(requirements)]
  File "~/miniconda3/envs/myenv/lib/python3.8/site-packages/liccheck/requirements.py", line 51, in resolve
    for dist in pkg_resources.working_set.resolve(requirements):
  File "~/miniconda3/envs/myenv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 782, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (pandas 1.3.5 (~/miniconda3/envs/myenv/lib/python3.8/site-packages), Requirement.parse('pandas==1.3.3'))

I'll admit I don't fully understand the error. I'm also a bit confused as I didn't think liccheck would check for dependency version conflicts - is there a way to turn this off maybe?

Many thanks for any help, and for this great tool!

@asmith26
Copy link
Author

asmith26 commented Jan 20, 2022

I found this was as a result of having a different version of pandas installed to what my requirements.txt specified.

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

1 participant