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

[BUG] if .default-python-packages package installation fails python version isn't installed. #177

Open
andrewcrook opened this issue Nov 4, 2023 · 1 comment

Comments

@andrewcrook
Copy link

andrewcrook commented Nov 4, 2023

Provide environment information

OS:
Darwin Andrews-MBP 23.0.0 Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:34 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T8103 arm64

SHELL:
zsh 5.9 (x86_64-apple-darwin23.0)

BASH VERSION:
3.2.57(1)-release

ASDF VERSION:
v0.13.1-0586b37

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/Users/XXXX/.local/share/asdf
ASDF_DIR=/Users/XXXX/.config/asdf
ASDF_CONFIG_FILE=/Users/XXXX/.config/asdf-config/asdfrc

ASDF INSTALLED PLUGINS:
direnv                       https://github.com/asdf-community/asdf-direnv.git master 2b649c8
lua                          https://github.com/Stratus3D/asdf-lua.git HEAD 36fae6e
luajit                       https://github.com/smashedtoatoms/asdf-luaJIT.git HEAD bbfe3cd
nodejs                       https://github.com/asdf-vm/asdf-nodejs.git HEAD 9c4e0f2
python                       https://github.com/danhper/asdf-python.git daa7d6ee57 daa7d6e

To Reproduce

  1. create .default-python-packages
# You can specify a non-default location of this file by setting a ASDF_PYTHON_DEFAULT_PACKAGES_FILE variable
xdg_base_dirs

Note xdg_base_dirs doesn’t work with the version of python we are going to install this is so we can get an error.

  1. run
asdf install  python 3.8.10

response

python-build 3.8.10 /Users/XXXX/.local/share/asdf/installs/python/3.8.10
python-build: use openssl from homebrew
python-build: use readline from homebrew
Downloading Python-3.8.10.tar.xz...
-> https://www.python.org/ftp/python/3.8.10/Python-3.8.10.tar.xz
Installing Python-3.8.10...
patching file 'Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst'
patching file configure
patching file configure.ac
python-build: use tcl-tk from homebrew
python-build: use readline from homebrew
python-build: use ncurses from homebrew
python-build: use zlib from xcode sdk
Installed Python-3.8.10 to /Users/XXXX/.local/share/asdf/installs/python/3.8.10

Installing default python packages...ERROR: Could not find a version that satisfies the requirement xdg_base_dirs (from versions: none)
ERROR: No matching distribution found for xdg_base_dirs
WARNING: You are using pip version 21.1.1; however, version 23.3.1 is available.
You should consider upgrading via the '/Users/XXXX/.local/share/asdf/installs/python/3.8.10/bin/python3.8 -m pip install --upgrade pip' command.
  1. run
 asdf list python

see 3.8.10 is missing

  1. run
 ls /Users/XXXX/.local/share/asdf/installs/python/

see 3.8.10 is missing

Describe the Bug

if you use .default-python-packages
and a package install fails when installing python
The compiled version of python isn't left in the ~/.local/share/asdf/installs/python/ directory
I am not sure if this isn't copied or if it is some sort of rollback.

if you correct or remove issue in .default-python-packages
everything works as it should.

Expected Behaviour

if .default-python-packages fails the compiled version of python should remain on the ~/.local/share/asdf/installs/python/ directory so the issue can be resolved by the user using pip.

@dadastoor
Copy link

I too am experiencing this bug and it's really annoying because it forces me to pin a lower version of packages so that there is a common version between python versions

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

No branches or pull requests

2 participants