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
conda 4.6.14 needs additional escaping of "!=" on Windows command line #8588
Comments
Hi there, thank you for your contribution! This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs. If you would like this issue to remain open please:
NOTE: If this issue was closed prematurely, please leave a comment. Thanks! |
Still an issue. Just updated my environment and picked one of the packages that got upgraded (e.g. filelock 3.6 -> 3.7). Actually, it's even worse because now the work-around doesn't work anymore.
all do not pick up the downgrade. The workaround now fails
It seems that exclamation marks are being stripped completely.
or
My setup is:
|
I can confirm that this is still an issue with conda 4.12 – maybe |
As part of package match specifications, users can use
!=
to exclude a specific version. Inconda
versions up to 4.6.12, the!=
did not need any escaping on the Windows command line. Optionally, escaping could be used for consistency with other operators such as>=
. For example, the following commands all installed asympy
version different from1.1.0
:With
conda
4.6.14, all of the above will instead interpret the package match specification assympy=1.1.0
, i.e. install the exact version that the user wanted to exclude. The workaround is to escape the exclamation mark twice, i.e. the following correctly excludes version 1.1.0:conda install "sympy^!=1.1.0"`
However, this specification will not work with older versions of conda.
I have very limited experience with Windows batch files, but I think it has to do with commit 2b7c8ec which introduced
@SETLOCAL EnableDelayedExpansion
intoconda.bat
:conda/conda/shell/condabin/conda.bat
Line 15 in f38d1f7
Steps to Reproduce
Expected Behavior
A new environment with a
sympy
version not equal to version1.1.0
should be created; instead, the environment installs this very version.Environment Information
`conda info`
The text was updated successfully, but these errors were encountered: