Skip to main content
 首页 » 编程设计

python之OSX 下 pip 中区分大小写的包名称

2024年11月01日14www_RR

我正在尝试使用 pip(我通过 Anaconda 获得;请参阅下面的版本信息)来安装名为 HTML.py 的 Python 包

这个包的名字至少有两个不寻常的特 pip :

  1. 以“.py”结尾
  2. 它使用大写字母

我好像无法安装这个包。运行 pip install HTML.py 不起作用,如果我删除 .py pip 继续并安装一个不同的包,这个名为 html.

我可以获取 pip 来安装我想要的包吗?

63-176-57-107:~ kuzzooroo$ pip search HTML.py 
HTML.py                   - A Python module to easily generate HTML code 
                            (tables, lists, ...). See 
                            http://www.decalage.info/python/html for more 
                            information. 
odt2html.py               - Basic .odt to .html command line converter 
63-176-57-107:~ kuzzooroo$ pip install HTML.py 
Downloading/unpacking HTML.py 
  Could not find any downloads that satisfy the requirement HTML.py 
Cleaning up... 
No distributions at all found for HTML.py 
Storing complete log in /Users/kuzzooroo/.pip/pip.log 
63-176-57-107:~ kuzzooroo$ pip install HTML 
Downloading/unpacking HTML 
  Downloading html-1.16.tar.gz 
  Running setup.py egg_info for package HTML 
 
Installing collected packages: HTML 
  Running setup.py install for HTML 
 
Successfully installed HTML 

这是我使用的 Anaconda 版本:

Python 2.7.6 |Anaconda 1.8.0 (x86_64)| (default, Nov 11 2013, 10:49:09)  
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin 
Type "help", "copyright", "credits" or "license" for more information. 
 
Imported NumPy 1.7.1, SciPy 0.13.0, Matplotlib 1.3.1 
Type "scientific" for more details. 

顺便说一句,pip 对我来说适用于其他包。

请您参考如下方法:

我觉得不是pip的问题。如果您转到 HTML.py ( https://pypi.python.org/pypi/HTML.py/0.04 ) 的 PyPi 页面,它会引导您进入 http://www.decalage.info/python/html 的下载页面。 .

但是,该页面上没有可下载的包,作者的 BitBucket 帐户也没有列出 HTML.py 存储库。

我认为无论出于何种原因,作者已经拉下了这个包,但没有更新 PyPi。