Hack to deal with a missing python3 alias on Windows
Project description
python3
Hack to handle a missing alias/symlink, for example when you're on windows or don't want to be bothered
This exists so that the following Makefile command will execute correctly on windows.
PLATFORM_ARCH := $(shell python3 -c "import platform; print(platform.machine())")
Installation
To get python3 everywhere and python3 means just some random isolated python3
pipx install python3-alias
To get a known version of python3, install into the system or venv.
pip install python3-alias
Motivation
Yes, I know, one solution is for you to personally purchase a Macbook for everyone in the world. Please include me when you do.
Things that don't work
In git bash, this isn't picked up.
alias python3=python
Link python3 to python in bash
ln -s /c/Users/USER/AppData/Local/Programs/Python/Python312/python /usr/bin/python3
# ln: failed to create symbolic link '/usr/bin/python3': Permission denied
Also adding python3=python
to this file didn't work.
nano "/C/Program Files/Git/etc/profile.d/aliases.sh"
Also, a shell file named python3
didn't work.
Installing python from the Microsoft Store might work, I didn't try. I'd rather install from python.org.
Limitations
At the moment, there are no features to configure the python3 alias to use a python executable other than the system, pipx or venv depending on where you installed it.
This alias isn't to replace pyenv, asdf or the like.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file python3_alias-1.0.3.tar.gz
.
File metadata
- Download URL: python3_alias-1.0.3.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54d4144f57d3f997801748c2cfced988e2a9429571b77e7f73c90390acb0eeab |
|
MD5 | e45ebae6666ceb985763a9cb50ac6053 |
|
BLAKE2b-256 | 4e3785ec04c1f7411fe33919320517e2bd14e0ef5009d4955d1af2aee76de422 |
File details
Details for the file python3_alias-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: python3_alias-1.0.3-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87e472ca94ee832d4a4453c62e18f04c08fcaf30461f1409ad72065fec11beb9 |
|
MD5 | adba7a81cf0128d73974a7d5385e673d |
|
BLAKE2b-256 | 424691604f4854378eb7323d563f445546b1612021cdd76f4c7a1ccbfc22e0b6 |