I made a test package and uploaded it to pypi here: https://pypi.org/project/martin-test-package-11122/0.0.1/
The code of my package's __init__.py
file is this:
import os
import sys
print("inside martin's test pip package")
print("the script has the arg %s" % (sys.argv[1]))
When I run the file locally with python3 __init__.py testArgument
it just prints the argument output as expected.
I installed my package with pip3 install martin-test-package-11122==0.0.1
and verified it's installed by running pip3 freeze.
How can I run my installed package from the command line? I'm trying to call my installed package with a command like python3 -m pip3 martin-test-package-11122 commandLineArg
to get the output from my __init__.py
file like when ran it locally. But this -m command just causes the error /usr/bin/python3: No module named pip3
I've been googling to try and find this and the closest I can find is this stackoverflow question, which says to run python3
and import pip3
but even trying that didn't work.