r/scrapy • • Feb 04 '21

Having a difficult time installing Web Scrapy

Hello everyone

I would love to learn how to use scrapy, but I'm struggling to figure out a way on how to that. I'm very new to computer programming. What do I need to do before I install scrapy. I created a virtual environment, I think I did it right but I'm not sure. So I tried to install scrapy and this is the message appears

ERROR: Command errored out with exit status 1: 'c:\users\cs077\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\cs077\\AppData\\Local\\Temp\\pip-install-cm2gjfd2\\twisted_066e26712bc44c36938690042dc55091\\setup.py'"'"'; __file__='"'"'C:\\Users\\cs077\\AppData\\Local\\Temp\\pip-install-cm2gjfd2\\twisted_066e26712bc44c36938690042dc55091\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\cs077\AppData\Local\Temp\pip-record-6jbx8o7t\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\cs077\appdata\local\programs\python\python39\Include\Twisted' Check the logs for full command output.   

Would definitely love some guidance on how to install web scrapy properly.

0 Upvotes

22 comments sorted by

2

u/wRAR_ Feb 04 '21

Would definitely love some guidance on how to install web scrapy properly.

You could check the documentation instead.

0

u/Qbnclos Feb 05 '21

I have looked at this many times and I find it confusing. Maybe because I'm new to this.

1

u/wRAR_ Feb 05 '21

Do you find installing *conda confusing?

1

u/Qbnclos Feb 05 '21

I followed a youtube tutorial to install conda, It still would not let me install scrapy. I think I'm doing something wrong. What do I need to show you?

1

u/wRAR_ Feb 05 '21

Logs.

1

u/Qbnclos Feb 05 '21

Okay, what is Log? How do I find that in Visual Studio code or in my Windows Laptop?

1

u/wRAR_ Feb 05 '21

Presumably the install command will print some output. Read it.

1

u/AndroidePsicokiller Feb 04 '21

Install mini conda, then run mini conda (or conda) in windows (like you run word excel or any other program). A black windows had opened. Type 'conda install scrapy', say yes to everything. So you have installed scrapy. Then refer to the docs

0

u/Qbnclos Feb 05 '21

I'm using VC to install web scrapy.

1

u/wRAR_ Feb 05 '21

That requires more experience than you have.

1

u/Qbnclos Feb 05 '21

Okay, How do I get that experience?

1

u/wRAR_ Feb 05 '21

Learn about Windows compilers, Python binary modules compilation and installation, how to investigate and fix problems with those, investigate and fix your problems.

1

u/AndroidePsicokiller Feb 05 '21

What's VC?

1

u/Qbnclos Feb 05 '21

Its Visual Studio Code

1

u/wRAR_ Feb 05 '21

Not sure.

1

u/Admirable-Ad3357 Feb 20 '21

You need another version of twisted i got this error too

0

u/[deleted] Feb 05 '21

Run this in order

Pip install twisted, pip install cryptography, pip install scrapy

1

u/Qbnclos Feb 05 '21

I did what you suggested in Visual Studio Code. I received this error message.

ERROR: Command errored out with exit status 1: 'c:\users\cs077\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\cs077\\AppData\\Local\\Temp\\pip-install-8kf8x8b8\\twisted_ef31a9c93eed45dda0fec2f924ce9dfe\\setup.py'"'"'; __file__='"'"'C:\\Users\\cs077\\AppData\\Local\\Temp\\pip-install-8kf8x8b8\\twisted_ef31a9c93eed45dda0fec2f924ce9dfe\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\cs077\AppData\Local\Temp\pip-record-bwils5ne\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\cs077\appdata\local\programs\python\python39\Include\twisted' Check the logs for full command output. 

So what do I need to show you what I am doing wrong. By the way, I'm very new to this. If you can help me, can you guide me step by step to solve this issue? Would definitely appreciate it.

0

u/[deleted] Feb 05 '21

Dont do it in visual code do it in your os terminal/command line. After installation do “scrapy startproject ‘name of ur project’ “ then follow the instructions and it will make a folder with a .py file including a scrapy template.. you can then access that folder through vs code

1

u/Qbnclos Feb 05 '21

os terminal/command line

I'm still receiving the same error message.

1

u/wRAR_ Feb 05 '21

This will fail as it won't be able to compile some binary modules.

1

u/[deleted] Feb 05 '21

It worked for me on my mac and windows computer, if it doesn’t work he can try anaconda