Skip to content

Script fails with misleading message if python command is not available #54

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

Closed
HoT-1 opened this issue Mar 5, 2023 · 2 comments
Closed
Milestone

Comments

@HoT-1
Copy link

HoT-1 commented Mar 5, 2023

If the command python is not available the following code fails to detect the location of python and continues with VIRTUALENVWRAPPER_PYTHON=''.

# Locate the global Python where virtualenvwrapper is installed.
if [ "${VIRTUALENVWRAPPER_PYTHON:-}" = "" ]
then
    VIRTUALENVWRAPPER_PYTHON="$(command \which python)"
fi

The result is the following output:

Command '' not found.
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON= and that PATH is
set properly.

The issue can occur even if python is installed. In my case python3 was installed in WSL Ubuntu 22.04. But per default there is no link from python to python3. For this link to exists the package python-is-python3 must be installed.

@dhellmann
Copy link
Contributor

This should be resolved by #28. Could you see if version 6.0.0.0a2 still has the same behavior?

@dhellmann dhellmann added this to the 6.0.0 milestone Dec 21, 2023
@dhellmann
Copy link
Contributor

Closing as fixed.

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

No branches or pull requests

2 participants