Installing Pypcap on Raspi Error

113 views
Skip to first unread message

Michael

unread,
Apr 21, 2023, 12:29:17 PM4/21/23
to weewx-user
I have been trying to get pypcap on my raspi so I can intercept wu-client for my station.  I looked through this group and recommendation was to use pip3 to try and install it with no luck.  Running out of ideas to try.  


sudo pip3 install pypcap
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pypcap
  Using cached pypcap-1.3.0.tar.gz (140 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d2zn6opw/pypcap_1013b1fb334c415c92f389a5e182a50b/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d2zn6opw/pypcap_1013b1fb334c415c92f389a5e182a50b/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-_exmsl_t
         cwd: /tmp/pip-install-d2zn6opw/pypcap_1013b1fb334c415c92f389a5e182a50b/
    Complete output (1 lines):
    pcap.h not found
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/db/4f/419ad9b163f3e86c32ae3b1e2937709520e24dce589897a26fb875189520/pypcap-1.3.0.tar.gz#sha256=669976786b2b4c43869c0ecf6228cbbb70336d1d8eb8d4fe2a3a81df395f45b5 (from https://pypi.org/simple/pypcap/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached pypcap-1.2.3.tar.gz (136 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d2zn6opw/pypcap_efdbb3eb008142698f35b7ffdef8b846/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d2zn6opw/pypcap_efdbb3eb008142698f35b7ffdef8b846/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-li6eifbm
         cwd: /tmp/pip-install-d2zn6opw/pypcap_efdbb3eb008142698f35b7ffdef8b846/
    Complete output (1 lines):
    pcap.h not found
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/12/71/a689ca8c6ef4570e105efdc6b46d4ac16cdef7af36a8fbfaff0f6fa2b754/pypcap-1.2.3.tar.gz#sha256=ad87fa22fe05f46b5dc602724958f1025af82ba3116694eddf5cb3035f3ab1f0 (from https://pypi.org/simple/pypcap/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached pypcap-1.2.2.tar.gz (130 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d2zn6opw/pypcap_3c34a772b3154549ab8c16f5fe14051c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d2zn6opw/pypcap_3c34a772b3154549ab8c16f5fe14051c/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-jyo9_y5h
         cwd: /tmp/pip-install-d2zn6opw/pypcap_3c34a772b3154549ab8c16f5fe14051c/
    Complete output (1 lines):
    pcap.h not found
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/33/21/d1f24d8a93e4e11bf604d77e04080c05ecb0308a5606936a051bd2b2b5da/pypcap-1.2.2.tar.gz#sha256=a32322f45d63ff6196e33004c568b9f5019202a40aa2b16008b7f94e7e119c1f (from https://pypi.org/simple/pypcap/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached pypcap-1.2.1.tar.gz (130 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d2zn6opw/pypcap_abd1bcc177114a48b24128bf89e00366/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d2zn6opw/pypcap_abd1bcc177114a48b24128bf89e00366/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-d429bjky
         cwd: /tmp/pip-install-d2zn6opw/pypcap_abd1bcc177114a48b24128bf89e00366/
    Complete output (1 lines):
    pcap.h not found
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/cd/b5/8b5ff59d1702c10a9a4ebbf61b8ae3185435b222f1efd1419b178d68bbe9/pypcap-1.2.1.tar.gz#sha256=9ca9f79ca839fdc8fd37393509e2cb06be70f8db03f8cfe1857ca40cac1149f0 (from https://pypi.org/simple/pypcap/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached pypcap-1.2.0.tar.gz (123 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d2zn6opw/pypcap_bbcbf2fc0b324be583ac2948f5dcea50/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d2zn6opw/pypcap_bbcbf2fc0b324be583ac2948f5dcea50/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-f__0m614
         cwd: /tmp/pip-install-d2zn6opw/pypcap_bbcbf2fc0b324be583ac2948f5dcea50/
    Complete output (1 lines):
    pcap.h not found
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/5e/d2/dd63a41409a3a308dc8d0e64794996950ca79a1ea6df2cfedfb0a44f5e50/pypcap-1.2.0.tar.gz#sha256=6981b95a975cb964806899735319ca71cfd0b5a4e9f9a45970b558f49eec0158 (from https://pypi.org/simple/pypcap/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached pypcap-1.1.6.tar.gz (50 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d2zn6opw/pypcap_93385d989e2441e7965c24fb83547d2e/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d2zn6opw/pypcap_93385d989e2441e7965c24fb83547d2e/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-agia8n9x
         cwd: /tmp/pip-install-d2zn6opw/pypcap_93385d989e2441e7965c24fb83547d2e/
    Complete output (1 lines):
    pcap.h not found
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/ba/60/e724203144e2afbbc921f62152ece8bff792a173fd8104ff003ff571a4ce/pypcap-1.1.6.tar.gz#sha256=d1eb3194a2e242ff782666d18620c8b3a1053ea7758e897e792129c141c5a7b3 (from https://pypi.org/simple/pypcap/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached pypcap-1.1.5.tar.gz (44 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d2zn6opw/pypcap_19ff60986d30465d81cea7e3e9bea4cf/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d2zn6opw/pypcap_19ff60986d30465d81cea7e3e9bea4cf/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-jr4hvklm
         cwd: /tmp/pip-install-d2zn6opw/pypcap_19ff60986d30465d81cea7e3e9bea4cf/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-d2zn6opw/pypcap_19ff60986d30465d81cea7e3e9bea4cf/setup.py", line 36
        print "Found pcap headers in %s" % pcap_h
              ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Found pcap headers in %s" % pcap_h)?
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/83/25/dab6b3fda95a5699503c91bf722abf9d9a5c960a4480208e4bad8747dd0c/pypcap-1.1.5.tar.gz#sha256=4b60d331e83c5bff3e25c7d99e902ea0910027fe9ce7986f0eecf5e0af6e8274 (from https://pypi.org/simple/pypcap/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached pypcap-1.1.4.1.tar.gz (41 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d2zn6opw/pypcap_92e85dc540c64b85b7850a951c35adf9/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d2zn6opw/pypcap_92e85dc540c64b85b7850a951c35adf9/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-3m0mj0y5
         cwd: /tmp/pip-install-d2zn6opw/pypcap_92e85dc540c64b85b7850a951c35adf9/
    Complete output (1 lines):
    pcap.h not found
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/bc/0b/3f0e81c19566f0cdf21f649ac22aeb4037ce87454c1f98b20be2df3797a3/pypcap-1.1.4.1.tar.gz#sha256=dbe24ecbaa5d684f91e59c78c2a2ee28b4ff082032c192ebbecdd34c53138244 (from https://pypi.org/simple/pypcap/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached pypcap-1.1.4.tar.gz (41 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d2zn6opw/pypcap_aa38a815b18445b5b7a16b4eb00b8352/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d2zn6opw/pypcap_aa38a815b18445b5b7a16b4eb00b8352/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ib1tv3xa
         cwd: /tmp/pip-install-d2zn6opw/pypcap_aa38a815b18445b5b7a16b4eb00b8352/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-d2zn6opw/pypcap_aa38a815b18445b5b7a16b4eb00b8352/setup.py", line 37
        print "Found pcap headers in %s" % pcap_h
              ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Found pcap headers in %s" % pcap_h)?
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/05/db/cebe323a8fed23f191460f61582ab3e42dffc709ea13d6433b2dea87e61f/pypcap-1.1.4.tar.gz#sha256=294d92a36ece9a09369b9b9dc1bfb81fdd4a9d3b38cf96fb4638ca52f7f0c647 (from https://pypi.org/simple/pypcap/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached pypcap-1.1.3.tar.gz (44 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d2zn6opw/pypcap_af755cd8aa6b4137af7d2db130c2e87d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d2zn6opw/pypcap_af755cd8aa6b4137af7d2db130c2e87d/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-v5kt_8m2
         cwd: /tmp/pip-install-d2zn6opw/pypcap_af755cd8aa6b4137af7d2db130c2e87d/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-d2zn6opw/pypcap_af755cd8aa6b4137af7d2db130c2e87d/setup.py", line 40
        print "Found pcap headers in %s" % pcap_h
              ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Found pcap headers in %s" % pcap_h)?
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/f2/7a/150d4a9eff36433e0f61524286fd30f9b734ecd0bf7ea0758175df7b958b/pypcap-1.1.3.tar.gz#sha256=cc0786efd527f16c5f0d08accf3cbd9ff8971ddc284a445cdabf2e47b458a377 (from https://pypi.org/simple/pypcap/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached pypcap-1.1.2.tar.gz (44 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d2zn6opw/pypcap_d21ada96f6094ced871bfd9f11254eb7/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d2zn6opw/pypcap_d21ada96f6094ced871bfd9f11254eb7/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-c7_ppzjg
         cwd: /tmp/pip-install-d2zn6opw/pypcap_d21ada96f6094ced871bfd9f11254eb7/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-d2zn6opw/pypcap_d21ada96f6094ced871bfd9f11254eb7/setup.py", line 40
        print "Found pcap headers in %s" % pcap_h
              ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Found pcap headers in %s" % pcap_h)?
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/f3/2d/5569e041903c452a6d83e0ca6058682a5539612e02b7fe01f83900b26155/pypcap-1.1.2.tar.gz#sha256=4401737fbbfbe06edaeeeab43287987af27b97d367d42e882c091d887f78f3b0 (from https://pypi.org/simple/pypcap/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached pypcap-1.1.1.tar.gz (44 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d2zn6opw/pypcap_4393992b88e34a1e89b25f4d71683ef9/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d2zn6opw/pypcap_4393992b88e34a1e89b25f4d71683ef9/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-wvan2vsq
         cwd: /tmp/pip-install-d2zn6opw/pypcap_4393992b88e34a1e89b25f4d71683ef9/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-d2zn6opw/pypcap_4393992b88e34a1e89b25f4d71683ef9/setup.py", line 39
        print "Found pcap headers in %s" % pcap_h
              ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Found pcap headers in %s" % pcap_h)?
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/c0/3d/27291dbe583eee995a4b3f07ce7615b7fd1851eceae1d69635bb5b02519b/pypcap-1.1.1.tar.gz#sha256=b310d5af36f5d68ef4217fda68086ffce56345b415eaac15ad618f94057b017b (from https://pypi.org/simple/pypcap/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached pypcap-1.1.tar.gz (8.7 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d2zn6opw/pypcap_35e17c44afcd40efa51388164044fcbf/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d2zn6opw/pypcap_35e17c44afcd40efa51388164044fcbf/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-z9fz0kht
         cwd: /tmp/pip-install-d2zn6opw/pypcap_35e17c44afcd40efa51388164044fcbf/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-d2zn6opw/pypcap_35e17c44afcd40efa51388164044fcbf/setup.py", line 59
        print "No pcap-int.h found"
              ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("No pcap-int.h found")?
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/44/18/2400db640fb5a52bdb3f2ad5790ec823f198b5a5fad15814fe676ee11260/pypcap-1.1.tar.gz#sha256=888494c9291abbeece104870723fac68db5740e3cd91a72f1317b86009e5cff0 (from https://pypi.org/simple/pypcap/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement pypcap
ERROR: No matching distribution found for pypcap
mike@raspberrypi:~/data/public_html $ 

vince

unread,
Apr 21, 2023, 3:00:14 PM4/21/23
to weewx-user
Your log snippet looked like you had a 'lot' of pre-existing cached stuff in your $HOME/.local tree.  You might want to at least temporarily rename your $HOME/.local and try it again to start anew and see if that helps.  Alternately you can try clearing the pip cache - see https://linuxhint.com/pip-clear-cache/ for a longer description

Worked for me in vanilla RaspiOS, FWIW...I created a new user 'testing' to do an installation for that user only.

testing@pi4:~ $ pip3 install pypcap --user

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pypcap
  Downloading https://www.piwheels.org/simple/pypcap/pypcap-1.3.0-cp39-cp39-linux_armv7l.whl (418 kB)
     |████████████████████████████████| 418 kB 224 kB/s
Installing collected packages: pypcap
Successfully installed pypcap-1.3.0

pi@pi4:~ $ uname -a
Linux pi4 5.15.84-v7l+ #1613 SMP Thu Jan 5 12:01:26 GMT 2023 armv7l GNU/Linux


pi@pi4:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"


Reply all
Reply to author
Forward
0 new messages