V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  h19981126g  ›  全部回复第 3 页 / 共 4 页
回复总数  66
1  2  3  4  
2018-08-14 16:31:25 +08:00
回复了 h19981126g 创建的主题 Python 在 Python 处理编码后显示到网页上出了点问题
@ClutchBear 不行呀,到 web 上显示的源码还是>这种转义的
@crazycabbage
@affyun
@thedog 嗯嗯,知道了
@crazycabbage 改回了,我需要用 python3 的库怎么办
@likuku Traceback (most recent call last):
File "/usr/bin/apt-listchanges", line 28, in <module>
import apt_pkg
ImportError: No module named 'apt_pkg'
Preconfiguring packages ...
(Reading database ... 41918 files and directories currently installed.)
Preparing to unpack .../libssl-dev_1.0.1t-1+deb8u9_amd64.deb ...
Unpacking libssl-dev:amd64 (1.0.1t-1+deb8u9) over (1.0.1t-1+deb8u8) ...
Preparing to unpack .../libssl1.0.0_1.0.1t-1+deb8u9_amd64.deb ...
Unpacking libssl1.0.0:amd64 (1.0.1t-1+deb8u9) over (1.0.1t-1+deb8u8) ...
Selecting previously unselected package libreadline6-dev:amd64.
Preparing to unpack .../libreadline6-dev_6.3-8+b3_amd64.deb ...
Unpacking libreadline6-dev:amd64 (6.3-8+b3) ...
Selecting previously unselected package libreadline-dev:amd64.
Preparing to unpack .../libreadline-dev_6.3-8+b3_amd64.deb ...
Unpacking libreadline-dev:amd64 (6.3-8+b3) ...
Selecting previously unselected package libsqlite3-dev:amd64.
Preparing to unpack .../libsqlite3-dev_3.8.7.1-1+deb8u2_amd64.deb ...
Unpacking libsqlite3-dev:amd64 (3.8.7.1-1+deb8u2) ...
Processing triggers for install-info (5.2.0.dfsg.1-6) ...
Setting up python-apt (0.9.3.12) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-apt (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of apt-listchanges:
apt-listchanges depends on python-apt (>= 0.7.93); however:
Package python-apt is not configured yet.

dpkg: error processing package apt-listchanges (--configure):
dependency problems - leaving unconfigured
Setting up python-ply (3.4-5) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-ply (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-pycparser:
python-pycparser depends on python-ply (>= 3.2); however:
Package python-ply is not configured yet.
python-pycparser depends on python-ply (<< 3.5) | python-ply-yacc-3.2; however:
Package python-ply is not configured yet.
Package python-ply-yacc-3.2 is not installed.
Package python-ply which provides python-ply-yacc-3.2 is not configured yet.
python-pycparser depends on python-ply-lex-3.2; however:
Package python-ply-lex-3.2 is not installed.
Package python-ply which provides python-ply-lex-3.2 is not configured yet.

dpkg: error processing package python-pycparser (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-cffi:
python-cffi depends on python-pycparser; however:
Package python-pycparser is not configured yet.

dpkg: error processing package python-cffi (--configure):
dependency problems - leaving unconfigured
Setting up python-colorama (0.3.2-1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-colorama (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up libssl1.0.0:amd64 (1.0.1t-1+deb8u9) ...
Setting up libssl-dev:amd64 (1.0.1t-1+deb8u9) ...
dpkg: dependency problems prevent configuration of python-cryptography:
python-cryptography depends on python-cffi; however:
Package python-cffi is not configured yet.

dpkg: error processing package python-cryptography (--configure):
dependency problems - leaving unconfigured
Setting up python-distlib (0.1.9-1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-distlib (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up python-html5lib (0.999-3) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-html5lib (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-openssl:
python-openssl depends on python-cryptography; however:
Package python-cryptography is not configured yet.

dpkg: error processing package python-openssl (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-ndg-httpsclient:
python-ndg-httpsclient depends on python-openssl; however:
Package python-openssl is not configured yet.

dpkg: error processing package python-ndg-httpsclient (--configure):
dependency problems - leaving unconfigured
Setting up python-urllib3 (1.16-1+deb8u1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-urllib3 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-requests:
python-requests depends on python-urllib3 (>= 1.16); however:
Package python-urllib3 is not configured yet.
python-requests depends on python-urllib3 (<< 1.16.1); however:
Package python-urllib3 is not configured yet.

dpkg: error processing package python-requests (--configure):
dependency problems - leaving unconfigured
Setting up python-setuptools (5.5.1-1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-setuptools (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-pip:
python-pip depends on python-colorama; however:
Package python-colorama is not configured yet.
python-pip depends on python-distlib; however:
Package python-distlib is not configured yet.
python-pip depends on python-html5lib; however:
Package python-html5lib is not configured yet.
python-pip depends on python-requests; however:
Package python-requests is not configured yet.
python-pip depends on python-setuptools (>= 0.6c1); however:
Package python-setuptools is not configured yet.

dpkg: error processing package python-pip (--configure):
dependency problems - leaving unconfigured
Setting up python-pyasn1 (0.1.7-1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-pyasn1 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up python-wheel (0.24.0-1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-wheel (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up libreadline6-dev:amd64 (6.3-8+b3) ...
Setting up libreadline-dev:amd64 (6.3-8+b3) ...
Setting up libsqlite3-dev:amd64 (3.8.7.1-1+deb8u2) ...
Processing triggers for libc-bin (2.19-18+deb8u7) ...
Errors were encountered while processing:
python-apt
apt-listchanges
python-ply
python-pycparser
python-cffi
python-colorama
python-cryptography
python-distlib
python-html5lib
python-openssl
python-ndg-httpsclient
python-urllib3
python-requests
python-setuptools
python-pip
python-pyasn1
python-wheel
E: Sub-process /usr/bin/dpkg returned an error code (1)
如你所见的报错 No module named 'apt_pkg'
@crazycabbage 呃,我 update-alternatives --list 列出只有 python3.4,默认输入 python 打开的是 python3,但 python2 也能打开 python2.7.9,这要怎么搞?
2018-08-05 21:32:04 +08:00
回复了 tangzhangming 创建的主题 云计算 当 IT 规模达到多大的时候,离开云最划算?
和你说吧,公司活跃财产每到 1 亿就别想这些乱七八糟的
2018-08-03 20:14:37 +08:00
回复了 h19981126g 创建的主题 Python Python 正则表达式 re 中出现'str' object has no attribute 'findall'
@AX5N 好的吧
@kenorizon
@TuringGunner 知道了,谢谢!
2018-07-22 19:37:03 +08:00
回复了 h19981126g 创建的主题 Python 用 requests 测试代理 IP 失败了,求助!
@also24 谢谢,已经找到了,只是没回复,我直接用的 proxies = {"all": proxy} 不知道有没有问题
2018-07-21 20:51:07 +08:00
回复了 h19981126g 创建的主题 Python 用 requests 测试代理 IP 失败了,求助!
@ysc3839 我有办法爬到,只是现在没爬
2018-07-21 20:12:19 +08:00
回复了 h19981126g 创建的主题 Python 用 requests 测试代理 IP 失败了,求助!
我有办法爬到,只是现在没爬
2018-07-21 19:56:53 +08:00
回复了 h19981126g 创建的主题 Python 用 requests 测试代理 IP 失败了,求助!
@ysc3839 不用管 csv 是怎么样的,我设置读到 python 里就是个数组,就是解决 requests 代理从数组中读取地址,和 https 的问题
http://i4.bvimg.com/653190/d2ca3f32af5b6288.jpg
http://i4.bvimg.com/653190/67387ae897763b8d.jpg
2018-07-21 19:50:13 +08:00
回复了 h19981126g 创建的主题 Python 用 requests 测试代理 IP 失败了,求助!
@also24 就是看过了还不知道怎么解决 才来问的。
2018-07-21 19:40:49 +08:00
回复了 h19981126g 创建的主题 Python 用 requests 测试代理 IP 失败了,求助!
@ysc3839 proxies 我看过文档是怎么写的,就是问数组里的 ip 怎样变成参考里带引号能用的样子
2018-07-21 19:38:30 +08:00
回复了 h19981126g 创建的主题 Python 用 requests 测试代理 IP 失败了,求助!
@sola97 我的 ip 的列表有 https 和 http,一般怎么处理好?
2018-07-21 19:38:07 +08:00
回复了 h19981126g 创建的主题 Python 用 requests 测试代理 IP 失败了,求助!
我的 ip 的列表有 https 和 http,一般怎么处理好?
@JCZ2MkKb5S8ZX9pq ok,回头试试看
@JCZ2MkKb5S8ZX9pq 是 r.status_code
@JCZ2MkKb5S8ZX9pq 好的呢
@JCZ2MkKb5S8ZX9pq 请问大致可以怎么写呢?
@qsnow6 试过了,一样
1  2  3  4  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2539 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 18ms · UTC 05:53 · PVG 13:53 · LAX 21:53 · JFK 00:53
Developed with CodeLauncher
♥ Do have faith in what you're doing.