首页>>后端>>java->python安装包找不到setup?

python安装包找不到setup?

时间:2023-12-13 本站 点击:0

安装python库时具体怎样怎样执行python setup.py install

现进入CMD,然后输入DOS命令进入setup.py文件所在目录,然后输入python setup.py install就搞定了。

python3.7安装失败

主要是要知道哪里出现问题了啊,点log file看问题出在哪。比如说看操作系统是否匹配,3.7.3仅支持Windows Vista和更新的操作系统版本,不支持XP,如果需要在Windows XP装的话,只能安装Python 3.4及之前版本。只有知道问题在哪,才好出谋划策。

Django安装输入python setup.py install 无效

setup.py文件没有在当前目录下,cd到解压目录下安装,

另外安装django的方法有好几种,下载easy_install或者pip工具

easy_install django==1.5.1

pip install django==1.5.1

高分求python setup.py install 安装出现问题?提示:ImportError: No module named Shared.DC.ZRD

看情况是你的安装包不完整。少了些内容。

shared.dc.zrdb.tm这个包从命名规则上看是一个习惯在windows下编程的人做的。unix和python都是对大小敏感的。所以为了程序的移植性,通常都不使用大小写来命名。

从内容上看,似乎是一个WEB的爬行器,有一个大的URL库,其中库有可能是从网上下载使用的。

所以你可以尝试从网上重新下载完整的安装包。或者是旧的安装包。旧的安装包里也许有这个文件,先安装旧的。再安装新的也许就没有问题了。

为什么python安装包的setup.py没有对应的uninstall参数

作者:victor yu

链接:

来源:知乎

著作权归作者所有,转载请联系作者获得授权。

刚试了下pip uninstall是可以的,但是相关的依赖包不会自动删除。

[root@nessus ~]# pip list

Django (1.8.4)

MySQL-python (1.2.5)

pip (7.1.2)

pysqlite (2.8.1)

setuptools (18.2)

[root@nessus ~]# pip install httpie

Collecting httpie

Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)",)': /simple/httpie/

Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)",)': /simple/httpie/

Downloading httpie-0.9.2-py2.py3-none-any.whl (66kB)

100% |████████████████████████████████| 69kB 325kB/s

Collecting requests=2.3.0 (from httpie)

Downloading requests-2.8.1-py2.py3-none-any.whl (497kB)

100% |████████████████████████████████| 499kB 618kB/s

Collecting Pygments=1.5 (from httpie)

Downloading Pygments-2.0.2-py2-none-any.whl (672kB)

100% |████████████████████████████████| 675kB 338kB/s

Installing collected packages: requests, Pygments, httpie

Successfully installed Pygments-2.0.2 httpie-0.9.2 requests-2.8.1

[root@nessus pip_test]# pip list

Django (1.8.4)

httpie (0.9.2)

MySQL-python (1.2.5)

pip (7.1.2)

Pygments (2.0.2)

pysqlite (2.8.1)

requests (2.8.1)

setuptools (18.2)

[root@nessus pip_test]# pip uninstall httpie

Uninstalling httpie-0.9.2:

/usr/local/bin/http

/usr/local/lib/python2.7/site-packages/httpie-0.9.2.dist-info/DESCRIPTION.rst

/usr/local/lib/python2.7/site-packages/httpie-0.9.2.dist-info/METADATA

/usr/local/lib/python2.7/site-packages/httpie-0.9.2.dist-info/RECORD

/usr/local/lib/python2.7/site-packages/httpie-0.9.2.dist-info/WHEEL

/usr/local/lib/python2.7/site-packages/httpie-0.9.2.dist-info/entry_points.txt

/usr/local/lib/python2.7/site-packages/httpie-0.9.2.dist-info/metadata.json

/usr/local/lib/python2.7/site-packages/httpie-0.9.2.dist-info/top_level.txt

/usr/local/lib/python2.7/site-packages/httpie/__init__.py

/usr/local/lib/python2.7/site-packages/httpie/__init__.pyc

/usr/local/lib/python2.7/site-packages/httpie/__main__.py

/usr/local/lib/python2.7/site-packages/httpie/__main__.pyc

/usr/local/lib/python2.7/site-packages/httpie/cli.py

/usr/local/lib/python2.7/site-packages/httpie/cli.pyc

/usr/local/lib/python2.7/site-packages/httpie/client.py

/usr/local/lib/python2.7/site-packages/httpie/client.pyc

/usr/local/lib/python2.7/site-packages/httpie/compat.py

/usr/local/lib/python2.7/site-packages/httpie/compat.pyc

/usr/local/lib/python2.7/site-packages/httpie/config.py

/usr/local/lib/python2.7/site-packages/httpie/config.pyc

/usr/local/lib/python2.7/site-packages/httpie/context.py

/usr/local/lib/python2.7/site-packages/httpie/context.pyc

/usr/local/lib/python2.7/site-packages/httpie/core.py

/usr/local/lib/python2.7/site-packages/httpie/core.pyc

/usr/local/lib/python2.7/site-packages/httpie/downloads.py

/usr/local/lib/python2.7/site-packages/httpie/downloads.pyc

/usr/local/lib/python2.7/site-packages/httpie/input.py

/usr/local/lib/python2.7/site-packages/httpie/input.pyc

/usr/local/lib/python2.7/site-packages/httpie/models.py

/usr/local/lib/python2.7/site-packages/httpie/models.pyc

/usr/local/lib/python2.7/site-packages/httpie/output/__init__.py

/usr/local/lib/python2.7/site-packages/httpie/output/__init__.pyc

/usr/local/lib/python2.7/site-packages/httpie/output/formatters/__init__.py

/usr/local/lib/python2.7/site-packages/httpie/output/formatters/__init__.pyc

/usr/local/lib/python2.7/site-packages/httpie/output/formatters/colors.py

/usr/local/lib/python2.7/site-packages/httpie/output/formatters/colors.pyc

/usr/local/lib/python2.7/site-packages/httpie/output/formatters/headers.py

/usr/local/lib/python2.7/site-packages/httpie/output/formatters/headers.pyc

/usr/local/lib/python2.7/site-packages/httpie/output/formatters/json.py

/usr/local/lib/python2.7/site-packages/httpie/output/formatters/json.pyc

/usr/local/lib/python2.7/site-packages/httpie/output/formatters/xml.py

/usr/local/lib/python2.7/site-packages/httpie/output/formatters/xml.pyc

/usr/local/lib/python2.7/site-packages/httpie/output/processing.py

/usr/local/lib/python2.7/site-packages/httpie/output/processing.pyc

/usr/local/lib/python2.7/site-packages/httpie/output/streams.py

/usr/local/lib/python2.7/site-packages/httpie/output/streams.pyc

/usr/local/lib/python2.7/site-packages/httpie/plugins/__init__.py

/usr/local/lib/python2.7/site-packages/httpie/plugins/__init__.pyc

/usr/local/lib/python2.7/site-packages/httpie/plugins/base.py

/usr/local/lib/python2.7/site-packages/httpie/plugins/base.pyc

/usr/local/lib/python2.7/site-packages/httpie/plugins/builtin.py

/usr/local/lib/python2.7/site-packages/httpie/plugins/builtin.pyc

/usr/local/lib/python2.7/site-packages/httpie/plugins/manager.py

/usr/local/lib/python2.7/site-packages/httpie/plugins/manager.pyc

/usr/local/lib/python2.7/site-packages/httpie/sessions.py

/usr/local/lib/python2.7/site-packages/httpie/sessions.pyc

/usr/local/lib/python2.7/site-packages/httpie/utils.py

/usr/local/lib/python2.7/site-packages/httpie/utils.pyc

Proceed (y/n)? y

Successfully uninstalled httpie-0.9.2

[root@nessus pip_test]# pip list

Django (1.8.4)

MySQL-python (1.2.5)

pip (7.1.2)

Pygments (2.0.2)

pysqlite (2.8.1)

requests (2.8.1)

setuptools (18.2)

python怎么安装第三方类库

使用pip

大多数库都可以通过pip安装,安装方法为,在命令行窗口输入

pip install libname

libname为库名

某些库通过pip安装不了,可能是因为没有打包上传到pypi中,可以下载安装包之后离线安装,方法是

pip install libpath

libpath为本地安装包地址,这些安装包一般以whl为后缀名。表示python扩展包的windows环境下的二进制文件。

有一个专门下载这种文件的地方,是由加利福尼亚大学的师生为方便python用户使用而建立的,并非官方出品,使用时需自行承担风险。

源文件安装

如果下载下来的安装包为带有源文件的压缩包,解压之后,运行setup.py进行安装,方法是

命令行切换到安装包中setup.py文件所在的目录,执行 python setup.py install

运行安装包

有些类库提供了双击运行直接安装的安装包,比如python连接mysql数据库的驱动 mysql-connector-python

这些安装包的后缀名为msi或者exe。下载下来之后,双击运行之后就安装好了,前提是要根据python的版本及windows的位数下载对应的安装包,否则安装过程会报错或者直接提示无法安装。


本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:/java/31130.html