question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error on conda dependencies made noarch

See original GitHub issue

As conda is responsible for performing the transformational magic of installing noarch: python packages, it is very risky to make conda’s dependencies noarch: python and should be avoided. In this effort, it would be very helpful if the linter errored any time one of conda’s dependencies is converted into a noarch: python package.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
CJ-Wrightcommented, Jul 10, 2018
0reactions
mbargullcommented, Jul 12, 2018
conda search conda --info --json \| jq .conda[-1].depends

depending on the versions you want to take into account, you might want

$ conda search conda --info --json | jq '.conda | [ .[] | .depends | .[] | split(" ")[0] ] | unique'                                                                                                                                                                             
[
  "conda-env",
  "enum34",
  "futures",
  "pycosat",
  "pyopenssl",
  "python",
  "pyyaml",
  "requests",
  "ruamel_yaml"
]
$ conda search conda --info --json | jq '.conda | [ .[] | select([.version | split(".") | .[] | tonumber] | .[0] >=4 and .[1] >=3) | .depends | .[] | split(" ")[0] ] | unique'                                                                                                  
[
  "conda-env",
  "enum34",
  "futures",
  "pycosat",
  "pyopenssl",
  "python",
  "requests",
  "ruamel_yaml"
]

Is there a way to get that from Python?

Yes, even easier, e.g.,

from itertools import chain
from conda.exports import MatchSpec, get_index

m = MatchSpec('conda')
deps_list = [r.depends for r in get_index().values() if m.match(r)]
deps = set(MatchSpec(dep).name for dep in chain.from_iterable(deps_list))
# deps == {'python', 'pyyaml', 'enum34', 'ruamel_yaml', 'pycosat', 'conda-env', 'futures', 'requests', 'pyopenssl'}

You can then tell get_index which platforms and channels to consider and fine-tune the MatchSpec if you only want to look at newer version of conda.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting — conda 22.11.1.post16+ce4e810c9 ...
Conda upgrade error. ValidationError: Invalid value for timestamp. Unicode error after installing Python 2. Windows environment has not been activated.
Read more >
How to fix the environment with inconsistent dependencies ...
Fortunately I have fixed my Spyder by using command 'conda install --revision 2', and updated my Spyder in the Anaconda Navigator. – Bruce...
Read more >
Error when updating conda packages: RemoveError
RemoveError: 'setuptools ' is a dependency of conda and cannot be removed from conda's operating environment. The only thing that actually worked ...
Read more >
Getting Started with Conda – Introduction to Python for Data ...
Make your projects self-contained and reproducible by capturing all package dependencies in a single requirements file. Allow you to install packages on a...
Read more >
Why you should use Poetry instead of Pip or Conda for Python ...
Conda : Conda is a dependency management tool that comes with Anaconda. ... pip conda-forge/noarch::pip-22.0.4-pyhd8ed1ab_0 python ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found