asdf-community / asdf-community/asdf-python
"No preset version installed for command clear" after installing python 3.12.3 and anaconda3-2024.02-1
- Dominant language
- Shell
- Stars
- 729
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
### Provide environment information
```bash
➜ ~ asdf info
OS:
Darwin MiMacBookAir.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:41 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8103 arm64
SHELL:
zsh 5.9 (x86_64-apple-darwin23.0)
BASH VERSION:
3.2.57(1)-release
ASDF VERSION:
v0.14.0
ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/Users/USERNAME/.asdf
ASDF_DIR=/opt/homebrew/opt/asdf/libexec
ASDF_CONFIG_FILE=/Users/USERNAME/.asdfrc
ASDF INSTALLED PLUGINS:
java https://github.com/halcyon/asdf-java.git master 8aef0e7
node https://github.com/asdf-vm/asdf-nodejs.git master c5b7c40
python https://github.com/asdf-community/asdf-python.git master 5e277e2
```
### To Reproduce
asdf install python 3.12.3
asdf global python 3.12.3
asdf install python anaconda3-2024.02-1
asdf global python anaconda3-2024.02-1
asdf global python 3.12.3
Restart terminal or $SHELL
enter "clear"
I found closed but related issues on this matter:
https://github.com/asdf-vm/asdf/issues/414
https://github.com/asdf-community/asdf-python/issues/31
### Describe the Bug
After installing python 3.12.3 and anaconda3-2024.02-1 then switching back and forth between versions; the "clear" command on terminal does not work. It does not clear my terminal screen but receive an error message.
➜ ~ clear
No preset version installed for command clear
Please install a version by running one of the following:
asdf install python 3.12.3
or add one of the following versions in your config file at /Users/USERNAME/.tool-versions
python anaconda3-2024.02-1
➜ ~ cat .tool-versions
node 20.12.2
python 3.12.3
java zulu-javafx-21.34.19
This error does not occur when I switch back to anaconda3-2024.02-1 from python 3.12.3 and enter "clear" when I have set python 3.12.3 globally.
This also occurred on my Ubuntu machine. However, I "sudo apt reinstall ncurses-bin" and this fixed the issue for ubuntu.
Work around for macOS:
1. add and alias: alias clear="/usr/bin/clear"
2. Not recommended by Homebrew but after installing ncurses via homebrew:
brew link --force ncurses
echo 'export PATH="/opt/homebrew/opt/ncurses/bin:$PATH"' >> ~/.zshrc
$SHELL
### Expected Behaviour
After switching from anaconda to python 3.12.3 by using the asdf global command I should be able to clear my terminal screen without any issues. I am not sure why asdf shims or has a clear or why it supersedes the system's clear.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.