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.

I’m trying to use setup-miniconda with my python package setup. The default github workflow for python package ci was working:

name: traitar3

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.6, 3.7, 3.8]

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install pytest
        if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
    - name: Test with pytest
      run: |
        pytest -s --script-launch-mode=subprocess

…and here’s my yaml when incorporating setup-miniconda:

name: traitar3

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    name: build (${{ matrix.python-version }}, ${{ matrix.os }})
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.6, 3.7, 3.8]
    steps:
    - uses: goanpeca/setup-miniconda@v1
      with:
        miniconda-version: 'latest'
        auto-update-conda: true
        python-version: ${{ matrix.python-version }}
        channels: conda-forge,bioconda
        activate-environment: traitar3
    - name: conda env create
      shell: bash -l {0}
      run: |
        conda info -a
        conda install python=${{ matrix.python-version }} bioconda::hmmer scipy pandas numpy matplotlib
    - name: package install
      run: |
        python -m pip install --upgrade pip
        pip install pytest pytest-dependency pytest-console-scripts
        python setup.py install
    - name: Test with pytest
      run: |
        pytest -s --script-launch-mode=subprocess

The setup-miniconda version always throws the error: python: can't open file 'setup.py': [Errno 2] No such file or directory. I’m guessing that either uses: goanpeca/setup-miniconda@v1 or shell: bash -l {0} is changing the working directory, so then setup.py cannot be found. I’ve been trying to debug this for a while with a number of approaches and haven’t found a solution. Any help would be appreciated.

It would be helpful to include python package setup in one of the setup-miniconda examples.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
goanpecacommented, May 10, 2020
0reactions
goanpecacommented, May 10, 2020

Glad you got it working 👍🏼

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Get and Change the Current Working Directory in Python
To change the current working directory in Python, use the chdir() method. os.getcwd(path)
Read more >
Get and change the current working directory in Python
You can change the current directory like the Unix command cd . Both chdir and cd stand for "change directory". os.chdir ...
Read more >
Changing the Current Directory - Win32 apps - Microsoft Learn
An application can change the current directory by calling the SetCurrentDirectory function.
Read more >
CWD—Changing the Working Directory - TCP/IP ... - Unisys
CWD —Changing the Working Directory ; Usercode and family components are specified in the command. Changes the usercode and family to the specified...
Read more >
Change Current Directory (CHGCURDIR) - IBM
The Change Current Directory (CHGCURDIR) command changes a specified directory to the current working directory. The current directory can be a directory, ...
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