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.

"conda env remove --name InnerEye" fails because `tqdm` is overloaded

See original GitHub issue

Once the PYTHONPATH is set to the repository root, it is no longer possible to remove environments (or quite possibly do anything with environments). Conda uses the tqdm package, and we have a hack for that at repository root to avoid further dependencies.

antonsc@MSR:/mnt/c/git$ conda env remove -n InnerEye
Traceback (most recent call last):
  File "/home/antonsc/miniconda2/bin/conda-env", line 6, in <module>
    from conda_env.cli.main import main
  File "/home/antonsc/miniconda2/lib/python2.7/site-packages/conda_env/cli/main.py", line 13, in <module>
    import conda.exports  # noqa
  File "/home/antonsc/miniconda2/lib/python2.7/site-packages/conda/exports.py", line 25, in <module>
    from . import plan  # NOQA
  File "/home/antonsc/miniconda2/lib/python2.7/site-packages/conda/plan.py", line 26, in <module>
    from .core.link import PrefixSetup, UnlinkLinkTransaction
  File "/home/antonsc/miniconda2/lib/python2.7/site-packages/conda/core/link.py", line 43, in <module>
    from ..resolve import MatchSpec
  File "/home/antonsc/miniconda2/lib/python2.7/site-packages/conda/resolve.py", line 9, in <module>
    from tqdm import tqdm
  File "/mnt/c/git/InnerEye-DeepLearning/tqdm.py", line 14
    def tqdm(arg: Any, *_rest: Any) -> Any:
                ^
SyntaxError: invalid syntax

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ant0nsccommented, Sep 30, 2020

Problem is still here:

(base) antonsc@MSR:/mnt/c/git/InnerEye-DeepLearning$ export PYTHONPATH=`pwd`
(base) antonsc@MSR:/mnt/c/git/InnerEye-DeepLearning$ cd ..
(base) antonsc@MSR:/mnt/c/git$ conda env remove -n foo2
Traceback (most recent call last):
  File "/home/antonsc/miniconda2/bin/conda-env", line 6, in <module>
    from conda_env.cli.main import main
  File "/home/antonsc/miniconda2/lib/python2.7/site-packages/conda_env/cli/main.py", line 13, in <module>
    import conda.exports  # noqa
  File "/home/antonsc/miniconda2/lib/python2.7/site-packages/conda/exports.py", line 25, in <module>
    from . import plan  # NOQA
  File "/home/antonsc/miniconda2/lib/python2.7/site-packages/conda/plan.py", line 26, in <module>
    from .core.link import PrefixSetup, UnlinkLinkTransaction
  File "/home/antonsc/miniconda2/lib/python2.7/site-packages/conda/core/link.py", line 43, in <module>
    from ..resolve import MatchSpec
  File "/home/antonsc/miniconda2/lib/python2.7/site-packages/conda/resolve.py", line 9, in <module>
    from tqdm import tqdm
ImportError: cannot import name tqdm

Fix is in PR already.

0reactions
MaherJendoubicommented, Sep 30, 2020

I didn’t succeed to reproduce it.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

conda remove does not remove entire environment #9873
The second step is failing because the environment wasn't fully removed. From the Jenkins log: + conda remove --name Farmlib_conda_linux ...
Read more >
cannot import name 'tqdm' from 'conda._vendor.tqdm ...
I'm trying to use Anaconda on my Mac. The installer keeps on feeding back that the installation cannot be performed because it claimed...
Read more >
conda remove
Remove a list of packages from a specified conda environment. This command will also remove any package that depends on any of the...
Read more >
Tqdm - :: Anaconda.org
conda install. To install this package run one of the following: conda install -c conda-forge tqdm conda install -c "conda-forge/label/broken" tqdm
Read more >
Conda Env Creation stage fails with "Could not install ...
The .yml file I use to create my conda env, looks like this: name: ABC ... We will close this ticket since it...
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