Closed j2ghz closed 7 years ago
I have the same problem on OSX 10.11.1
I was able to get it to install by replacing d with '/usr' on line 46 of setup.py, like this:
lib_sub_dirs = [os.path.join('/usr', sub_dir) \
I can't guarantee it will work on all systems as it is a quick and dirty hack, but there you go
same problem on Ubuntu 15.04
➜ ~ sudo pip install pypcap
Downloading/unpacking pypcap
Downloading pypcap-1.1.4.tar.gz (41kB): 41kB downloaded
Running setup.py (path:/tmp/pip-build-mtsqO_/pypcap/setup.py) egg_info for package pypcap
Found pcap headers in /usr/src/linux-headers-4.2.0-30-generic/include/config/ezx/pcap.h
Found libraries in None
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-mtsqO_/pypcap/setup.py", line 60, in <module>
lib_file = os.path.basename(lib_file_path)
File "/usr/lib/python2.7/posixpath.py", line 114, in basename
i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
Complete output from command python setup.py egg_info:
Found pcap headers in /usr/src/linux-headers-4.2.0-30-generic/include/config/ezx/pcap.h
Found libraries in None
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-mtsqO_/pypcap/setup.py", line 60, in <module>
lib_file = os.path.basename(lib_file_path)
File "/usr/lib/python2.7/posixpath.py", line 114, in basename
i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-mtsqO_/pypcap
same problem in ubuntu 16.04:
pip install pypcap
Collecting pypcap
Using cached pypcap-1.1.5.tar.gz
Complete output from command python setup.py egg_info:
Found pcap headers in /usr/src/linux-headers-4.4.0-28-generic/include/config/touchscreen/pcap.h
Found libraries in None
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-YMm_2h/pypcap/setup.py", line 59, in <module>
lib_file = os.path.basename(lib_file_path)
File "/home/lconceicao/envs/pypcap-test/lib/python2.7/posixpath.py", line 114, in basename
i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-YMm_2h/pypcap/
Pip is using the wrong pcap header. Install libpcap-dev will fix this issue in ubuntu.
Note the current development of pypcap is now on: https://github.com/pynetwork/pypcap.
Please file issues there.
/home//.pip/pip.log