Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CondaFileIOError on Installing * environment... with Miniconda installer on Linux #13110

Open
5 of 8 tasks
rgoubet opened this issue Dec 23, 2022 · 11 comments
Open
5 of 8 tasks
Labels

Comments

@rgoubet
Copy link

rgoubet commented Dec 23, 2022

Checklist

  • I added a descriptive title.
  • I searched through existing issues and couldn't find a solution or duplicate issue.
  • I searched on the web (e.g. Google) and didn't find any helpful information.
  • I searched the Anaconda documentation and didn't find any helpful information.

Impacted product

  • A conda package (built by Anaconda)
  • Anaconda Distribution (formerly Anaconda Individual Edition)
  • Miniconda
  • Anaconda.org

What happened?

When executing sh ./Miniconda3-py310_22.11.1-1-Linux-x86_64.sh on a fresh installation (having first renamed ~/miniconda3), I get the following:

Miniconda3 will now be installed into this location:
/home/user_name/miniconda3

 - Press ENTER to confirm the location
 - Press CTRL-C to abort the installation
 - Or specify a different location below

[/home/user_name/miniconda3] >>> 
PREFIX=/home/user_name/miniconda3
Unpacking payload ...
                                                                               
Installing base environment...


Downloading and Extracting Packages

Preparing transaction: done
Executing transaction: done
./Miniconda3-py310_22.11.1-1-Linux-x86_64.sh: 438: [[: Permission denied

Installing * environment...

./Miniconda3-py310_22.11.1-1-Linux-x86_64.sh: 444: [[: Permission denied

CondaFileIOError: '/home/user_name/miniconda3/pkgs/envs/*/env.txt'. [Errno 2] No such file or directory: '/home/user_name/miniconda3/pkgs/envs/*/env.txt'

A * environment? No wonder it doesn't work...

(Note: trying to update my existing environment with the -u switch has the same results).

No issue when using the earlier Miniconda3-py39_4.12.0-Linux-x86_64.sh package.

Expected behavior or outcome

Miniconda should install on Linux

Conda info

N/A (fresh install)

Conda config

N/A (fresh install)

Conda list

N/A (fresh install)

Additional information

No response

@dkim
Copy link

dkim commented Dec 24, 2022

Runing the installer with bash instead of sh will work:

bash Miniconda3-py310_22.11.1-1-Linux-x86_64.sh

[[ is an extension from ksh that bash also supports: https://unix.stackexchange.com/a/306115/.

@rgoubet
Copy link
Author

rgoubet commented Dec 25, 2022

Yes indeed! Changing the installation script so that it now requires a specific shell doesn't look like such a great idea, but at least it works, thanks!

@ashanbrown
Copy link

@rgoubet Should this have been closed? Do you know if there is a fix coming for the miniconda installation script? Thanks.

@rgoubet
Copy link
Author

rgoubet commented Dec 30, 2022

I think dkim's answer solves. I don't think it was a good idea to make this change, but it's probably not a problem that requires solving.

@ashanbrown
Copy link

The workaround works for me as well, but I just want to make sure that the request funnels back to the team maintaining to update the install script to make sure that their shebang script is compatible with the scripting language they've chosen. I'm pretty sure this can be described as a bug. Assuming this is the right place for that feedback, closing the issue just because there is a workaround, might not get this issue addressed. I can open a duplicate of this but reopening it seemed the ideal path forward since you've reported it already.

@rgoubet rgoubet reopened this Dec 31, 2022
@hyeokjunejeon
Copy link

hyeokjunejeon commented Jan 2, 2023

When looking into Miniconda3.sh, it still has a shebang like this:

#!/bin/sh
#
# NAME:  Miniconda3
# VER:   py310_22.11.1-1
# PLAT:  linux-64
# MD5:   81b26c617ffd9011dea96fd57c13e71b

I agree with ashanbrown's opinion. Although the suggested workaround works for me, I think it would be better to change the right syntax for that shebang in this script(Miniconda3.sh) by maintainers.

@kenahoo
Copy link

kenahoo commented Jan 5, 2023

Unix standards state that if a script starts with #!/bin/sh, it should only use sh-compatible syntax. If it uses extended syntax (like the [[ bashism) then it should start with #!/bin/bash or whatever is appropriate.

I didn't know this until I hit this error in Conda installation myself a couple weeks ago. I went looking for a definitive source right now, but unfortunately I couldn't find one with a few minutes' searching.

EDIT: here's such a statement, in the Debian Policy Manual:

If a shell script requires non-POSIX.1-2017 features from the shell interpreter other than those listed above, the appropriate shell must be specified in the first line of the script (e.g., #!/bin/bash)

@SuperiChili
Copy link

SuperiChili commented Feb 1, 2023

Got the same problem

`Downloading and Extracting Packages

Preparing transaction: done
Executing transaction: done
./Miniconda3-latest-Linux-x86_64.sh: 438: [[: not found

Installing * environment...

./Miniconda3-latest-Linux-x86_64.sh: 444: [[: not found

CondaFileIOError: '/home/razvan/miniconda3/pkgs/envs//env.txt'. [Errno 2] No such file or directory: '/home/razvan/miniconda3/pkgs/envs//env.txt'
`
and when I try to

hat

I get this error
[/home/razvan/miniconda3] >>> ERROR: File or directory already exists: '/home/razvan/miniconda3' If you want to update an existing installation, use the -u option.
How can I fix this? I don't want to update but to finish my miniconda3 installation.

@uthynauta
Copy link

Don't know why this is not yet solved on overall installation, @dkim workaround solved this for me.

@rabyj
Copy link

rabyj commented Feb 3, 2023

@SuperiChili
Remove incomplete and bugged install and reinstall with compatible language

rm -rf /home/razvan/miniconda3
bash /the/installer/script.sh

@pseudoyim
Copy link
Contributor

@rgoubet, thank you for opening this issue (and everyone else for commenting/responding). This issue should be fixed in the latest release of Miniconda-23.1.0-1, now available here: https://docs.conda.io/en/latest/miniconda.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants