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

"Python was not found" error message when running inside virtual environment #325

Open
vincentoconnell opened this issue Nov 3, 2021 · 1 comment

Comments

@vincentoconnell
Copy link

vincentoconnell commented Nov 3, 2021

When running the command

gimme-aws-creds -k --profile

inside a venv I get the following error with no other details:
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

This is a fresh Windows 10 install. Python 3.9.7 and 3.10.0 were just installed under C:. Default installation options and installed for all users. Both Python versions are on PATH.

Running -V commands verifies that both Python installations are available.

gimme-aws-creds is running inside a venv created with Python 3.9 (due to the endless installation bug with 3.10).

Expected Behavior

Generate temporary credentials for the specified profile.

Current Behavior

Error message:

Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

Steps to Reproduce (for bugs)

  1. py -3.9 -V
  2. py -3.9 -m venv venv
  3. venv\Scripts\activate
  4. pip install gimme-aws-creds
  5. Create okta_aw_login_config under user directory
  6. python -V
  7. pip -V
  8. gimme-aws-creds -k --profile

Your Environment

Brand new Windows 10 laptop (Windows 10 Entreprise 64 bit). Brand new Python 3.9.7 and 3.10.0 installations from the Windows installers. Only non-default options are installing for all users, placing in C:, and checking "add to PATH". gimme-aws-creds was installed using pip inside a virtual environment. virtual environment was Python 3.9.7 because 3.10.0 produces issue #320

@twuillemin
Copy link

You have to modify the file named gimme-aws-creds.cmd. (located probably in the Site folder of your Python environment)

Line 8: for %%j in (python3.%%i) do ( must be changed to for %%j in (python.%%i) do (

In older version of Python, the python executable for Python 3 was named python3.exe to differentiate with Python 2 which was python.exe. The gimme-aws-creds.cmd command file is still looking for this old executable.

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