Reputation: 613
For gitlab ci jobs I have previously run test scripts via python like this
- c:\anaconda3\env\my_env\python test.py
With numpy 1.18, however, activating the envirronment is required, otherwise it fails to import
I have tried via conda run:
- c:\anaconda3\scripts\conda run -n my_env -v python test.py
but then all output is swallowed (not shown in the job output).
I have also tried several ways and combinations of activate
and python test.py
with both cmd and powershell, but I have not found a way that activates the envirronment and runs the script with python from that envirronment.
Upvotes: 0
Views: 274
Reputation: 613
I solved the problem by using the git bash instead of powershell
C:\Program Files\Git\bin
to the system PATH
-variableadd to c:\\[gitlab_runner_dir]/config.toml
shell = "bash"
builds_dir="/c/gitlab-runner/builds/"
cache_dir="/c/gitlab-runner/cache/"
in .gitlab-ci.yml
add:
- source activate my_env
Upvotes: 1