DanMcInerney / xsscrapy

XSS spider - 66/66 wavsep XSS detected
1.66k stars 441 forks source link

dependent install error #10

Closed juicechu closed 10 years ago

juicechu commented 10 years ago

sudo pip install -r requirements.txt but error message

writing manifest file 'Twisted.egg-info/SOURCES.txt'

warning: manifest_maker: standard file '-c' not found

reading manifest file 'Twisted.egg-info/SOURCES.txt'

writing manifest file 'Twisted.egg-info/SOURCES.txt'

copying twisted/runner/portmap.c -> build/lib.linux-x86_64-2.7/twisted/runner

creating build/lib.linux-x86_64-2.7/twisted/internet/iocpreactor/iocpsupport

copying twisted/internet/iocpreactor/iocpsupport/iocpsupport.c -> build/lib.linux-x86_64-2.7/twisted/internet/iocpreactor/iocpsupport

copying twisted/internet/iocpreactor/iocpsupport/winsock_pointers.c -> build/lib.linux-x86_64-2.7/twisted/internet/iocpreactor/iocpsupport

copying twisted/python/sendmsg.c -> build/lib.linux-x86_64-2.7/twisted/python

copying twisted/test/raiser.c -> build/lib.linux-x86_64-2.7/twisted/test

running build_ext

x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c conftest.c -o conftest.o

building 'twisted.runner.portmap' extension

creating build/temp.linux-x86_64-2.7

creating build/temp.linux-x86_64-2.7/twisted

creating build/temp.linux-x86_64-2.7/twisted/runner

x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c twisted/runner/portmap.c -o build/temp.linux-x86_64-2.7/twisted/runner/portmap.o

twisted/runner/portmap.c:10:20: fatal error: Python.h: No such file or directory

 #include <Python.h>

                    ^

compilation terminated.

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip_build_root/Twisted/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-1LsoSA-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip_build_root/Twisted
Storing complete log in /home/geekzhu/.pip/pip.log
DanMcInerney commented 10 years ago

I just googled the error and this was the first result. http://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory

Looks like you just gotta sudo apt-get install python-dev

wiredfool commented 10 years ago

Just installed into a new Trusty VM, and I needed all of these:

sudo apt-get install libxml2-dev libxslt-dev
sudo apt-get install python-dev
sudo apt-get install libffi-dev
sudo apt-get install libssl-dev

pip install BeautifulSoup
pip install Ipython
DanMcInerney commented 10 years ago

Thanks wiredfool, I'll keep this open for a while and update instructions eventually.

DanMcInerney commented 10 years ago

I removed the IPython debugging stuff. Not sure where it's calling for beautifulsoup though, I couldn't find it in pipelines or the spider.

wiredfool commented 10 years ago

Looks like it's a broken lxml install:

Traceback (most recent call last):
  File "./xsscrapy.py", line 5, in <module>
    from xsscrapy.spiders.xss_spider import XSSspider
  File "/home/ubuntu/xsscrapy/xsscrapy/spiders/xss_spider.py", line 14, in <module>
    from lxml.html import soupparser, fromstring
  File "/home/ubuntu/vpy/local/lib/python2.7/site-packages/lxml/html/soupparser.py", line 7, in <module>
    from BeautifulSoup import \
ImportError: No module named BeautifulSoup
juicechu commented 10 years ago

@wiredfool @DanMcInerney Thank you for your help, i'm python rookie, but I'm progress

juicechu commented 10 years ago

By the way, how can I get close the issue

manishthakur101 commented 4 years ago

i had type this command line but this is giving an error

pip3 install -r requirements.txt Collecting Scrapy==1.1.0rc3 Using cached Scrapy-1.1.0rc3-py2.py3-none-any.whl (292 kB) Collecting pybloom==1.1 Using cached pybloom-1.1.tar.gz (10 kB) ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kl40ngra/pybloom/setup.py'"'"'; file='"'"'/tmp/pip-install-kl40ngra/pybloom/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-install-kl40ngra/pybloom/pip-egg-info cwd: /tmp/pip-install-kl40ngra/pybloom/ Complete output (8 lines): Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-kl40ngra/pybloom/setup.py", line 2, in from ez_setup import use_setuptools File "/tmp/pip-install-kl40ngra/pybloom/ez_setup.py", line 98 except pkg_resources.VersionConflict, e: ^ SyntaxError: invalid syntax

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

can anyone help me out @DanMcInerney

decidedlygray commented 4 years ago

Hello @manishthakur101 - I would recommend starting a new ticket, this one is closed

I believe your problem is that you are using pip3. From what I remember this project is Python2, not Python3, so you would want to use: pip install -r requirements.txt

addycracker commented 3 years ago

@manishthakur101 same here

addycracker commented 3 years ago

@decidedlygray not working

decidedlygray commented 3 years ago

@addycracker your message isn’t super helpful. In what way is that not working? What OS are you using? Do you have a stack trace, recreation steps or screenshots you can share? Etc.

also same advice as before: start a new ticket that isn’t marked as closed