python3,包和模块的关系,包到底是个啥,最好截个图给我看看

那么箭头指向的http文件夹就是一个包。

但是注意。包里面回必须包含一个__init__.py (这个模块里面可答以不写内容)

如果没有这个文件,那么就不是包了。。包下面放的client.py就是模块

Ⅱ 现在三方包支持最好的python3是哪个版本

3.4

  1. 基本都是支持3.3+的,对3.2很多不支持了。

  2. 对于3.5,由于在windows上采用了vs2015编译,运行时库变化太大,mingw无法编译对应的二进制扩展。所以很多二进制包对3.5支持比较差。

  3. 还有一个原因,3.4是最后一个支持WinXP的官方python3版本。

  4. python35 变化较大,引入的很多新特性很多IDE并不支持

因此,由于Python的跨平台特性,因此兼容性最好的还是python3.4。Debian Jessie默认的Python 3就是这个版本。

Ⅲ python3进行数据分析需要安装哪些包

numpy
pandas

Ⅳ 在python3中怎么安装其他包

你所问的问题,其实是属于:
1.先参考
【教程】Python中的内置的模块 和第三方的模块
搞懂PIL是属于第三方Python模块
2.再参考:
【待完善】【总结】Python安装第三方的库、package的方法
去安装PIL模块。
3.关于PIL的一些使用,可以参考:
【已解决】Python中通过Image的open之后,去show结果打不开bmp图片,无法正常显示图片

再针对PIL来说就是:
1. 这里不给贴地址,所以只能靠你自己用google搜:
python pil
第一个就是:
Python Imaging Library (PIL)
点击进去后,找到自己python版本的PIL,比如:
Python Imaging Library 1.1.7 for Python 2.7 (Windows only)
下载,双击,安装,即可。

2. 如果下载到的是PIL源码,
则打开cmd,切换到其目录
然后执行
setup.py install
就可以通过源码方式安装了。

这些方法,上面帖子其实都有总结的。

(此处不给贴地址,请自己用google搜帖子标题,就可以找到帖子地址了)

Ⅳ python3.2 下的抓包库。。无论是pypcap还是scapy。貌似都没有py3的版本。。跪求一个可以python3用

有一个py3kcap是pycap的封装版本,可以用于python3版本。

给你一个使用的示例代码

#!/usr/bin/env python3.2
import ctypes,sys
from ctypes.util import find_library
#pcap = ctypes.cdll.LoadLibrary("libpcap.so")
pcap = None
if(find_library("libpcap") == None):
print("We are here!")
pcap = ctypes.cdll.LoadLibrary("libpcap.so")
else:
pcap = ctypes.cdll.LoadLibrary(find_library("libpcap"))
# required so we can access bpf_program->bf_insns
"""
struct bpf_program {
u_int bf_len;
struct bpf_insn *bf_insns;}
"""
class bpf_program(ctypes.Structure):
_fields_ = [("bf_len", ctypes.c_int),("bf_insns", ctypes.c_void_p)]
class sockaddr(ctypes.Structure):
_fields_=[("sa_family",ctypes.c_uint16),("sa_data",ctypes.c_char*14)]
class pcap_pkthdr(ctypes.Structure):
_fields_ = [("tv_sec", ctypes.c_long), ("tv_usec", ctypes.c_long), ("caplen", ctypes.c_uint), ("len", ctypes.c_uint)]

pkthdr = pcap_pkthdr()
program = bpf_program()
# prepare args
snaplen = ctypes.c_int(1500)
#buf = ctypes.c_char_p(filter)
optimize = ctypes.c_int(1)
mask = ctypes.c_uint()
net = ctypes.c_uint()
to_ms = ctypes.c_int(100000)
promisc = ctypes.c_int(1)
filter = bytes(str("port 80"), 'ascii')
buf = ctypes.c_char_p(filter)
errbuf = ctypes.create_string_buffer(256)
pcap_close = pcap.pcap_close
pcap_lookupdev = pcap.pcap_lookupdev
pcap_lookupdev.restype = ctypes.c_char_p
#pcap_lookupnet(dev, &net, &mask, errbuf)
pcap_lookupnet = pcap.pcap_lookupnet
#pcap_t *pcap_open_live(const char *device, int snaplen,int promisc, int to_ms,
#char *errbuf
pcap_open_live = pcap.pcap_open_live
#int pcap_compile(pcap_t *p, struct bpf_program *fp,const char *str, int optimize,
#bpf_u_int32 netmask)
pcap_compile = pcap.pcap_compile
#int pcap_setfilter(pcap_t *p, struct bpf_program *fp);
pcap_setfilter = pcap.pcap_setfilter
#const u_char *pcap_next(pcap_t *p, struct pcap_pkthdr *h);
pcap_next = pcap.pcap_next
# int pcap_compile_nopcap(int snaplen, int linktype, struct bpf_program *program,
# const char *buf, int optimize, bpf_u_int32 mask);
pcap_geterr = pcap.pcap_geterr
pcap_geterr.restype = ctypes.c_char_p
#check for default lookup device
dev = pcap_lookupdev(errbuf)
#override it for now ..
dev = bytes(str("wlan0"), 'ascii')
if(dev):
print("{0} is the default interface".format(dev))
else:
print("Was not able to find default interface")

if(pcap_lookupnet(dev,ctypes.byref(net),ctypes.byref(mask),errbuf) == -1):
print("Error could not get netmask for device {0}".format(errbuf))
sys.exit(0)
else:
print("Got Required netmask")
handle = pcap_open_live(dev,snaplen,promisc,to_ms,errbuf)
if(handle is False):
print("Error unable to open session : {0}".format(errbuf.value))
sys.exit(0)
else:
print("Pcap open live worked!")
if(pcap_compile(handle,ctypes.byref(program),buf,optimize,mask) == -1):
# this requires we call pcap_geterr() to get the error
err = pcap_geterr(handle)
print("Error could not compile bpf filter because {0}".format(err))
else:
print("Filter Compiled!")
if(pcap_setfilter(handle,ctypes.byref(program)) == -1):
print("Error couldn't install filter {0}".format(errbuf.value))
sys.exit(0)
else:
print("Filter installed!")
if(pcap_next(handle,ctypes.byref(pkthdr)) == -1):
err = pcap_geterr(handle)
print("ERROR pcap_next: {0}".format(err))
print("Got {0} bytes of data".format(pkthdr.len))
pcap_close(handle)

Ⅵ 关于python3包的安装问题

如图,勾选这个选项,就是安装在本地,而不是一个项目

Ⅶ 在java中用python3.7的jar包

用jython就可以实现

Ⅷ python3parser在什么包

pdb 调试复
traceback 调试
pprint 漂亮的输出
logging 日志
threading和制multiprocessing 多线程
urllib/urllib2/httplib http库,httplib底层一点,推荐第三方的库requests
os/sys 系统,环境相关
Queue 队列
pickle/cPickle 序列化工具
hashlib md5, sha等hash算法
cvs

Ⅸ python3.3不自带的模块或工具包 下载以后要怎么处理才能在开发环境中调用 (比如放到pyth

之前需要先安装sip,解压到site-packages即可
然后安装pyqt4,用安装包点next就OK
主要需要确定Python的版本,有3.4和2.6分别对应64和32位的不同版本。

如果下载的是源代码包,安装就复杂些,sip和pyqt4都需要按照
configure.py
make
make install
的步骤安装,这个需要有C语言支持

Ⅹ python3.6.5人工智能方面所需要的包

这个没有上限的,python的扩展包上万至少,只能说你现在需要哪些方面,需要实现那些功能的模块