Reputation: 1538
I am trying to make my own python3 pip package. I uploaded it online with twine from my command line, and I can see it online here:
https://pypi.org/project/example-pkg-martinbarker-test/
I am following this tutorial exactly, (except for changing the package name), but if I try to install the package with the instruction from the url:
pip install example-pkg-martinbarker-test
I get an error:
# pip install example-pkg-martinbarker-test
Collecting example-pkg-martinbarker-test
Could not find a version that satisfies the requirement example-pkg-martinbarker-test (from versions: )
No matching distribution found for example-pkg-martinbarker-test
Is it something with how I uploaded my package to twine thats causing this error?
Upvotes: 0
Views: 2646
Reputation: 1538
fixed by uninstalling pip and install pip3, then installing my package with pip3
pip install example-pkg-martinbarker-test==0.0.1
thank you
Upvotes: 0
Reputation: 2287
The install works for me when installing using Python 3, and fails using Python 2.
In this case, ensure that you are running pip
for Python 3. You may wish to create a virtual environment for Python 3, and install the package.
To create the virtual environment:
virtualenv env -p python3
To activate the virtual env:
source ./env/bin/activate
To check the version:
pip -V
pip 19.3.1 from some/path/env/lib/python3.7/site-packages/pip (python 3.7)
To install:
pip install example-pkg-martinbarker-test
This successfully installs the package you mention.
Collecting example-pkg-martinbarker-test
Downloading https://files.pythonhosted.org/packages/b8/34/9cb503547689819a8c98048eb7127a3538243b0d44294987dba28eeb0259/example_pkg_martinbarker_test-0.0.1-py3-none-any.whl
Installing collected packages: example-pkg-martinbarker-test
Successfully installed example-pkg-martinbarker-test-0.0.1
Upvotes: 1