Home:ALL Converter>twine not found (-bash: twine: command not found)

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

Ask Time:2018-07-21T09:04:31         Author:peterpark828

Json Formatter

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.

Author:peterpark828,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/51451966/twine-not-found-bash-twine-command-not-found
Iman :

Use python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*",
2018-12-26T02:51:15
mallet :

Based on @hoefling comments run\n\npip show twine\n\n\nThat will list all files that belong to the twine package. It will output something like this:\n\n\nName: twine\nVersion: 1.12.1\nSummary: Collection of utilities for publishing packages on PyPI\nHome-page: https://twine.readthedocs.io/\nAuthor: Donald Stufft and individual contributors\nAuthor-email: [email protected]\nLicense: Apache License, Version 2.0\nLocation: /Users/hakuna.matata/.local/lib/python3.6/site-packages\nRequires: pkginfo, readme-renderer, tqdm, requests, requests-toolbelt, setuptools\nRequired-by: \n\n\n\nNote the first file under Files which is ../../../bin/twine and Location: /Users/hakuna.matata/.local/lib/python3.6/site-packages. Of course your user name will replace 'hakuna.matata'\n\nThat will lead to a path to package executable at /Users/hakuna.matata/.local/bin which you can add it to your .bash_profile as \nexport PATH=\"/Users/hakuna.matata/.local/bin:$PATH\"\n\nThen, either restart terminal or\n\nsource ~/.bash_profile\n",
2019-01-04T18:14:12
yy