Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

560
Views
How to activate a Conda Environment from the "sh" shell (on Nodejs)?

I can activate the Conda Environment with any problems from the bash shell. I can use this two options on bash:

source activate env_name
. activate env_name

But I am using the method exec of Node to run the activation of the environment. Node uses sh shell in order to run commands. I tried the commands above, but they did not work. I got this error

/bin/sh: 1: /env_name/bin/source: not found

So I had to use this command to run the environment

const child_process = require('child_process')
child_process.exec('bash -c "source activate env_name"')

Is there a better way to do this to make it work on Ubuntu?

I run this on Windows and it is enough to make it work

child_process.exec('activate env_name')
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Conda doesn't do well right now (in conda 4.3.x) with shells that aren't "advanced" like bash and zsh. Pure posix dash and the busybox shells, for example, don't work right now.

Good new though... They soon will. Support for a larger variety of shells is a feature of conda 4.4. The base PR for this work was https://github.com/conda/conda/pull/5044, and there are several follow-ons.

Conda 4.4.0 should be released into canary in the next several weeks.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!