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.

Having troubles activating an environment

See original GitHub issue

I’m having trouble simply activating the base environment. Here is a snippet from my recipe:

    - uses: conda-incubator/setup-miniconda@v2
      with:
        auto-update-conda: true
        auto-activate-base: true
        activate-environment: base
    - run: conda info
    - run: conda env update -n base --file environment.yaml

I’m getting

Error: To activate "base" environment use the "auto-activate-base" action input!

How can I improve it to actually work?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
goanpecacommented, Nov 16, 2020

@tdegeus because of how github actions work, you need to specify extra arguments for the actions as described in the README for the different shells.

      - name: Conda info
        shell: bash -l {0}
        run: conda info

If you do not use shell: bash -l {0} assuming you are using bash, then the action will not be able to activate the environments correctly.

This is a knowns limitation, you can read more here

3reactions
tdegeuscommented, Nov 17, 2020

Great @goanpeca , thanks for the help and for the PR!!

If I may give a personal experience on the readme while we close this question:

  • It would be great to document that the default environment name for my case is test, I don’t think I found that anywhere.
  • Personally it would (have) help(ed) me to have a few typical examples that are complete (e.g. a Python and a CMake test). Then some of the pitfalls that I encountered would have been more obvious to me (of course, everything is there, it’s just that one is from time to time a lazy reader, and it helps when things are presented ‘in your face’).
Read more comments on GitHub >

github_iconTop Results From Across the Web

I'm having trouble activating virtual environment using anaconda
I have installed anaconda 4.11.0 and I'm trying to activate my venv using the conda activate base but it shows me this error...
Read more >
terminal not activating the conda environment : PY-23417
I have tried the Early Access Program (EAP) version of PyCharm, but the terminal still does not automatically load the conda env (the...
Read more >
Problem with Activating Conda Environment - Getting Started
Hi everyone! I've been using Anaconda for a few months now, but I randomly started running into this problem a couple days ago....
Read more >
Virtual Environments - Problem Solving with Python
View a list of your virtual environments using the command conda info --envs or conda env list . > conda activate env_name (env_name)...
Read more >
Activating a virtual environment | Python Automation Cookbook
When dealing with multiple projects on the same computer, as they can have different dependencies that clash at some point. For example, two...
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