Skip to content

scripts have wrong interpreter after "conda install nibabel" in Windows #717

@yarikoptic

Description

@yarikoptic

Was trying to reproduce datalad/datalad#3116 on a freshly installed Window$ machine. Installed miniconda, created "datalad-dev" conda environment.
In regular "Anaconda Prompt" which seems to be running pure Windows cmd prompt, doesn't find/run nib-ls at all (regular entrypoint mechanism installed apps like datalad seems to work fine, but somehow it just ended up in /usr/bin/datalad using regular /usr/bin/python for interpreter -- yet to figure things out). If I start bash within it, then I get

/mnt/c/Temp/datasets.datalad.org/openneuro/ds000114$ nib-ls
-bash: /mnt/c/Users/XXX/AppData/Local/Continuum/miniconda3/envs/datalad-dev/Scripts/nib-ls: C:/Users/XXX/AppData/Local/Continuum/miniconda3/envs/datalad-dev/bin/python: bad interpreter: No such file or directory

well -- first of all the problem is that path is windows path so not sure if this bash could comprehend it. Then, the python is actually available not under /bin but /mnt/c/Users/XXX/AppData/Local/Continuum/miniconda3/envs/datalad-dev/python.exe

But even if I correct shebang to be a correct windows path -- it would not run in bash, and remains (well, there is no .exe etc I guess) not found by windows cmd. But even if I fix the path to be a full path to python.exe POSIX style I can't run it in that bash

/mnt/c/Temp/datasets.datalad.org/openneuro/ds000114$ nib-ls
C:\Users\XXX\AppData\Local\Continuum\miniconda3\envs\datalad-dev\python.exe: can't open file '/mnt/c/Users/XXX/AppData/Local/Continuum/miniconda3/envs/datalad-dev/Scripts/nib-ls': [Errno 2] No such file or directory

@chrisfilo - do you have recollection on how nibabel was installed and what you have in your shebang for it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions