简体   繁体   English

pypi没有安装

[英]pypi not installing

Why my pip not installing any solution for me When i run pip install abir It show me error为什么我的 pip 没有为我安装任何解决方案当我运行 pip install abir 它显示我错误

ERROR: Could not find a version that satisfies the requirement abir (from versions: none) ERROR: No matching distribution found for abir错误:找不到满足 abir 要求的版本(来自版本:无) 错误:找不到 abir 的匹配发行版

https://pypi.org/project/abir/0.1/ https://pypi.org/project/abir/0.1/

My setup.py我的设置.py

import setuptools
with open("README.md", "r") as fh:
    long_description = fh.read()
setuptools.setup(
     name='abir',  
     version='0.1',
     scripts=['abir'] ,
     author="ABIR HOSSAIN",
     author_email="abirhossain200019@gmail.com",
     description="this is a test file",
     long_description=long_description,
   long_description_content_type="text/markdown",
     url="https://github.com/ABIRHOSSAIN10/test",
     packages=setuptools.find_packages(),
     classifiers=[
         "Programming Language :: Python :: 2.7",
         "License :: OSI Approved :: MIT License",
         "Operating System :: OS Independent",
     ],
 )

At https://pypi.org/project/abir/0.1/#files there are two files, both with extension .egg .https://pypi.org/project/abir/0.1/#files有两个文件,扩展名为.egg Egg was a python packaging format but it's now old and outdated. Egg 是一种 python 包装格式,但现在已经过时了。 pip lost ability to install eggs long ago. pip很久以前就失去了安装鸡蛋的能力。

You can install these eggs using easy_install — a pre- pip installation program.您可以使用easy_install — 一个 pre- pip安装程序来安装这些鸡蛋。 Please note there are eggs for Python 2.7 and 3.10 but Python lost easy_install at version 3.7 so you can only use easy_install to install an egg for Python 2.7.请注意,Python 2.7 和 3.10 有鸡蛋,但 Python 在 3.7 版本中丢失了easy_install ,因此您只能使用easy_install为 Python 2.7 安装鸡蛋。

To really fix the problem you should publish sdist (source distribution with extension .zip or .tar.gz ) or wheel ( .whl ).要真正解决问题,您应该发布 sdist(扩展名为.zip.tar.gz源代码分发)或wheel( .whl )。 Run

python setup.py sdist
python setup.py bdist_wheel

and use twine to upload the generated packages.并使用twine上传生成的包。

Upd .更新 This is how it installs now:这是它现在的安装方式:

$ pip install phoneinfo
Collecting phoneinfo
  Using cached phoneinfo-0.1-py3-none-any.whl (3.0 kB)
Installing collected packages: phoneinfo
Successfully installed phoneinfo-0.1

I use this command and re install pypi我使用这个命令并重新安装pypi

python setup.py sdist
python setup.py bdist_wheel

Now i get four file https://pypi.org/project/phoneinfo/0.1/#files现在我得到四个文件https://pypi.org/project/phoneinfo/0.1/#files

When i install pip install phoneinfo I face this error当我安装 pip install phoneinfo 时,我遇到了这个错误

/data/data/com.termux/files/usr/bin/phoneinfo: line 2: try:: command not found
/data/data/com.termux/files/usr/bin/phoneinfo: line 3: import: command not found
/data/data/com.termux/files/usr/bin/phoneinfo: line 4: except:: command not found
/data/data/com.termux/files/usr/bin/phoneinfo: line 5: syntax error near unexpected token `"pip install phonenumbers"'
/data/data/com.termux/files/usr/bin/phoneinfo: line 5: `      os.system("pip install phonenumbers")'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM