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

笑着哭i 提交于 2019-12-04 04:26:09
Iman

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

Based on @hoefling comments run

pip show -f twine

That will list all files that belong to the twine package. It will output something like this:

Name: twine
Version: 1.12.1
Summary: Collection of utilities for publishing packages on PyPI
Home-page: https://twine.readthedocs.io/
Author: Donald Stufft and individual contributors
Author-email: donald@stufft.io
License: Apache License, Version 2.0
Location: /Users/hakuna.matata/.local/lib/python3.6/site-packages
Requires: pkginfo, readme-renderer, tqdm, requests, requests-toolbelt, setuptools
Required-by: 
Files:
  ../../../bin/twine
  twine-1.12.1.dist-info/INSTALLER
  twine-1.12.1.dist-info/LICENSE.txt
  twine-1.12.1.dist-info/METADATA
  twine-1.12.1.dist-info/RECORD
  twine-1.12.1.dist-info/WHEEL
  twine-1.12.1.dist-info/entry_points.txt
  twine-1.12.1.dist-info/top_level.txt
  twine/__init__.py
  twine/__main__.py
  twine/__pycache__/__init__.cpython-36.pyc
  twine/__pycache__/__main__.cpython-36.pyc
  twine/__pycache__/_installed.cpython-36.pyc
  twine/__pycache__/cli.cpython-36.pyc
  twine/__pycache__/exceptions.cpython-36.pyc
  twine/__pycache__/package.cpython-36.pyc
  twine/__pycache__/repository.cpython-36.pyc
  twine/__pycache__/settings.cpython-36.pyc
  twine/__pycache__/utils.cpython-36.pyc
  twine/__pycache__/wheel.cpython-36.pyc
  twine/__pycache__/wininst.cpython-36.pyc
  twine/_installed.py
  twine/cli.py
  twine/commands/__init__.py
  twine/commands/__pycache__/__init__.cpython-36.pyc
  twine/commands/__pycache__/check.cpython-36.pyc
  twine/commands/__pycache__/register.cpython-36.pyc
  twine/commands/__pycache__/upload.cpython-36.pyc
  twine/commands/check.py
  twine/commands/register.py
  twine/commands/upload.py
  twine/exceptions.py
  twine/package.py
  twine/repository.py
  twine/settings.py
  twine/utils.py
  twine/wheel.py
  twine/wininst.py

Note 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'

That will lead to a path to package executable at /Users/hakuna.matata/.local/bin which you can add it to your .bash_profile as export PATH='/Users/hakuna.matata/.local/bin:$PATH'

Then, either restart terminal or

source ~/.bash_profile
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!