package-installation-test
This package is designed to verify that you can successfully install Python packages from PyPI using pip, and subsequently use them. In particular, it is meant to test that you are installing packages to the correct Python installation. It is written to complement a question on Stack Overflow about this problem, to allow for testing the solutions offered there.
Installation
Install this package from PyPI using pip install package-installation-test. Alternately, clone the repository, navigate to the root of the repository, and then use pip install . to install it. Note the . at the end of the latter command (specifying the current directory).
Note carefully that the installed package has a different name from the name used on PyPI and in this repository; although we install package-installation-test (notice that this is not a valid Python identifier anyway), code will refer to the package as example_package.
Command-line use
Once installed, you should be able to "run" the package as a module, using python -m example_package.
Installation will also create a wrapper executable called demo-example-package, which you can run at the command line by that name.
Either of these options should print a diagnostic message that looks like:
Version 1.0.0 of example_package successfully installed.
The source code is in <...>.
where the <...> is replaced by the actual path where the code was installed.
API
You can verify that the code is usable as a package by importing it from the interactive prompt:
>>> import example_package
>>>
This provides two functions:
main - prints the same message as before.
home - returns the path to where the code was installed, as a pathlib.Path instance.
Both of these functions take no arguments.
Troubleshooting
If the above steps don't work as advertised, the problem is almost certainly that pip installed to a different installation of Python than the one you are trying to use. (If the demo-example-package doesn't work, that's because you installed to a Python installation that isn't the first one on the PATH.
Please read the corresponding question and answer on Stack Overflow to understand how to solve the problem.
Release files for package-installation-test 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| package-installation-test-1.0.0.tar.gz | 2.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| package_installation_test-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.8 kB
Release files / package-installation-test-1.0.0.tar.gz
| Download URL | package-installation-test-1.0.0.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7bab64f5f76cf31b1e0629895b01d02185662d7c1a33b37b4cd2a21afffcf984
|
|
BLAKE2b-256 checksum How to use checksums |
d1b012ddf7b07ee6dfca0a83e198eb869570ae1c3b502899b9d5077b7e1893b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.1 CPython/3.8.10 Linux/5.4.0-126-generic
|
Release files / package_installation_test-1.0.0-py3-none-any.whl
| Download URL | package_installation_test-1.0.0-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d367c5e99a83509443337a68d46424f0e52e0f098f3ed80646f00df25093318a
|
|
BLAKE2b-256 checksum How to use checksums |
902e1a808344ee608158e3a2c4d96a9b15652e1425d52870da925cddee4bd1d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.1 CPython/3.8.10 Linux/5.4.0-126-generic
|