Search code examples
pythonpippypitwine

twine not found (-bash: twine: command not found)


I am trying to use twine to publish my first python package on pypi (of course will add on test-pypi first).

I followed the official guideline on https://packaging.python.org/tutorials/packaging-projects/.

But for some reason, twine is not found or not properly installed.

I installed twine using:

pip install twine

"pip list" says twine is installed on pip.

After I upgraded twine and everything, when I tried to run:

twine upload --repository-url https://test.pypi.org/legacy/ dist/*

then it says that twine is not found at all:

-bash: twine: command not found . 

My system is mac (high sierra) and I am using python2.7 by conda. Pip is also configured to conda python:

>>pip -V 
>>pip 10.0.1 from /anaconda2/lib/python2.7/site-packages/pip (python 2.7)

I would appreciate your help.


Solution

  • Use python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*