Closed wgaylord closed 7 years ago
http://www.winpcap.org/devel.htm Place these files in proper places, installs fine on windows.
You should probably add some information on README.py regarding requirements. see: http://stackoverflow.com/questions/42567086/how-to-solve-this-pip-install-pypcap-error-both-in-windows-and-ubuntu-linux
It would be great if somebody with a windows machine and windows knowledge could open a PR with the relevant information on how to get it working on windows.
We now have better installation instructions for windows and @nuald made some changes to fix some of the issues you may have been encountering.
Feel free to re-open this ticket if it's not fixed.
http://www.winpcap.org/devel.htm Place these files in proper places, installs fine on windows.
What are "the proper places"?
@geajack check the windows instructions in the Readme: https://github.com/pynetwork/pypcap#installation-from-sources.
Please download the Npcap SDK, unpack the archive and put it into the sibling directory as wpdpack (setup.py will discover it).
I just ran into this issue also on Windows.
This is the solution:
pypcap_build
in C:\
)c:\pypcap_build\libpcap
(https://nmap.org/npcap/dist/npcap-sdk-1.03.zip)c:\pypca_build
run git clone https://github.com/pynetwork/pypcap.git --branch v1.2.3
cd pypcap
python setup.py install
Now to address this bug I recommend adding support in the setup.py to add an environment variable to the include path, Maybe something like PYPCAP_NPCAP_SDK
so it can actually be installed through pip. If the environment variable is not found it should error out instead of complaining it can't find npcap.h
.
pseudo code for setup.py
find_prefix_and_pcap_h
:
if windows:
try:
win_path = os.environ['PYPCAP_NPCAP_SDK']
# append win_path to others
except KeyError:
print("Environment Variable 'PYPCAP_NPCAP_SDK' needs to be set for Windows installations.")
I'm unfamiliar with the project and the setup script so hopefully this makes sense.
Runing pip install pypcap returns
I am on windows... (Which might be the whole problem)