-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
source::contributorcreated by a frequent contributorcreated by a frequent contributortype::bugdescribes erroneous operation, use severity::* to classify the typedescribes erroneous operation, use severity::* to classify the type
Description
Checklist
- I added a descriptive title
- I searched open reports and couldn't find a duplicate
What happened?
conda create
and install
commands support a --file
argument which is a list of files to install. Files can either be explicit files or regular text files. If there is a mix of --file
s that specify regular packages and explicit package then this will produce a ParseError
. For example, consider the following two environment files:
env1.txt (explicit file)
@EXPLICIT
https://repo.anaconda.com/pkgs/main/linux-64/_libgcc_mutex-0.1-main.conda
https://repo.anaconda.com/pkgs/main/linux-64/ca-certificates-2025.2.25-h06a4308_0.conda
env2.txt (regular text file)
numpy
Running a conda create
against these files individually works. Providing both files as arguments produces an error:
$ conda create -n testenv-mixed --file env1.txt --file env2.txt
ParseError: Could not parse explicit URL: file:///home/sophia/projects/conda/numpy
It is correct to raise an error for this situation, but it would be helpful if the error more accurately described what is going wrong and how to fix it. For example, it would be better for the result to be something like
$ conda create -n testenv-mixed --file env1.txt --file env2.txt
CondaError: can not mix `file` types
env1.txt is found to be an explicit type file
env2.txt is found to be requirements.txt type file
Checklist
Metadata
Metadata
Labels
source::contributorcreated by a frequent contributorcreated by a frequent contributortype::bugdescribes erroneous operation, use severity::* to classify the typedescribes erroneous operation, use severity::* to classify the type
Type
Projects
Status
🏁 Done
Status
TODO 📬
Status
Done 💪🏾