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.

Use conda run for conda environments for running python files and possibly installation

See original GitHub issue

Seems like this bit was missed: image

Feel free to also add it in the iteration planning board. Note we should not be using the OUTPUT_MARKER_SCRIPT for running/debugging files, so add an option in this API https://github.com/microsoft/vscode-python/blob/3b114e31dd992a72e3cd71b0876b05466228e75a/src/client/pythonEnvironments/common/environmentManagers/conda.ts#L408-L420 to skip that.

cc/ @karthiknadig

Issue Analytics

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

github_iconTop GitHub Comments

5reactions
fsjwlfcommented, Mar 5, 2022

Hi~ I updated my VSCode, and found that the new version seemed to fix this bug. However, after I run the python code, the terminal shows “run -n base --no-capture-output --live-stream python xxx.py”. And the result was printed. And immediately the result was cleared. I cannot see my result!

1reaction
karrtikrcommented, Mar 9, 2022

It turns out we cannot use conda run for installing modules. Reason is:

  • We already activate the conda environment before we send the installation command.
  • conda run then kind of double activates the environment, so the module isn’t installed where it’s expected.
  • When we run, for eg. a linter using conda run, it cannot find the module.

Seems like another bug on conda. (https://github.com/conda/conda/issues/11305)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Managing environments - Conda
With conda, you can create, export, list, remove, and update environments that have different versions of Python and/or packages installed in them.
Read more >
Master the basics of Conda environments in Python - YouTube
Master the basics of conda environments in Python : create environments (from command-line and YAML files ), get information on them, ...
Read more >
The guide to Python virtual environments with conda - WhiteBox
Master Python virtual environments with conda, once and for all. Learn how to install conda from scratch, manage, and packaging virtual ...
Read more >
My Python Environment Workflow with Conda - tdhopper.com
Packages are installed via the conda command line tool instead of Pip. By default, the conda install command installs packages from a curated ......
Read more >
Getting started with Python environments (using Conda)
If I try running both at once on Python 2 or Python 3, one of them may break because some of the code...
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