macOS下安装pyshark

本文介绍在MacOS Big Sur环境下安装PyShark的过程,包括解决安装过程中遇到的TShark未找到的问题,以及通过Homebrew成功安装Wireshark的方法。

环境:
macOS Big Sur
Python 3.8.2

>>> pip3 install pyshark
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pyshark
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d2/ed/acd141e42a4651e1a327eabba50c8faa8b2abb6b147da4258e97ef829a6f/pyshark-0.4.2.11-py3-none-any.whl (30 kB)
Collecting py
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/68/0f/41a43535b52a81e4f29e420a151032d26f08b62206840c48d14b70e53376/py-1.9.0-py2.py3-none-any.whl (99 kB)
     |████████████████████████████████| 99 kB 1.6 MB/s
Collecting lxml
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/c5/2f/a0d8aa3eee6d53d5723d89e1fc32eee11e76801b424e30b55c7aa6302b01/lxml-4.6.1.tar.gz (3.2 MB)
     |████████████████████████████████| 3.2 MB 16.2 MB/s
Building wheels for collected packages: lxml
  Building wheel for lxml (setup.py) ... done
  Created wheel for lxml: filename=lxml-4.6.1-cp38-cp38-macosx_10_14_6_x86_64.whl size=2942000 sha256=9f9f8686aff125410784b2fbe5876d01f5d94511273ec95c03dcb54518dc4c58
  Stored in directory: /Users/microfat/Library/Caches/pip/wheels/26/df/20/7022b751ad158cf81b26178b60d0d0353d9f9cf99bde628631
Successfully built lxml
Installing collected packages: py, lxml, pyshark
Successfully installed lxml-4.6.1 py-1.9.0 pyshark-0.4.2.11
>>> import pyshark
>>> cap = pyshark.FileCapture('/Users/microfat/Downloads/new/xxxx.pcap')
>>> cap[0]
---------------------------------------------------------------------------
TSharkNotFoundException                   Traceback (most recent call last)
About This Book, Learn why and how you can efficiently use Python to process data and build machine learning models in Apache Spark 2.0Develop and deploy efficient, scalable real-time Spark solutionsTake your understanding of using Spark with Python to the next level with this jump start guide, Who This Book Is For, If you are a Python developer who wants to learn about the Apache Spark 2.0 ecosystem, this book is for you. A firm understanding of Python is expected to get the best out of the book. Familiarity with Spark would be useful, but is not mandatory., What You Will Learn, Learn about Apache Spark and the Spark 2.0 architectureBuild and interact with Spark DataFrames using Spark SQLLearn how to solve graph and deep learning problems using GraphFrames and TensorFrames respectivelyRead, transform, and understand data and use it to train machine learning modelsBuild machine learning models with MLlib and MLLearn how to submit your applications programmatically using spark-submitDeploy locally built applications to a cluster, In Detail, Apache Spark is an open source framework for efficient cluster computing with a strong interface for data parallelism and fault tolerance. This book will show you how to leverage the power of Python and put it to use in the Spark ecosystem. You will start by getting a firm understanding of the Spark 2.0 architecture and how to set up a Python environment for Spark., You will get familiar with the modules available in PySpark. You will learn how to abstract data with RDDs and DataFrames and understand the streaming capabilities of PySpark. Also, you will get a thorough overview of machine learning capabilities of PySpark using ML and MLlib, graph processing using GraphFrames, and polyglot persistence using Blaze. Finally, you will learn how to deploy your applications to the cloud using the spark-submit command., By the end of this book, you will have established a firm understanding of the Spark Python API and how it can be used t
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值