0

Windows 10, Command Line Terminal, Python 3.6.3 |Anaconda, Inc.| (default, Oct 15 2017, 03:27:45) [MSC v.1900 64 bit (AMD64)] on win32

New to Python & following tutorial instructions here: https://docs.scrapy.org/en/latest/intro/tutorial.html

Steps:

  1. Downloaded Anaconda
  2. Installed scrapy package through Anaconda Navigator
  3. Opened terminal
  4. cd c:\Anaconda
  5. python
  6. scrapy startproject tutorial

Yields this error:

File "<stdin>", line 1
scrapy startproject tutorial
Syntax Invalid Syntax

See screenshot: https://www.dropbox.com/s/17d3r1hzt02pp2k/Screenshot%202017-11-08%2013.41.06.png?dl=0

I've run globals() to see that Scrapy appears to be running correctly.

I've also try running this command from c:\Anaconda directory.

python scrapy startproject tutorial

Which yielded this error:

python.exe: can't find '__main__' module in 'scrapy'

There may also be an issue with Anaconda & Scrapy (Cannot Set Up a Scrapy Project) though, to my knowledge, I installed correctly using the recommended method from scrapy.org.

Adam
  • 405
  • 1
  • 5
  • 22
  • I don't think Python is activated if I leave that out"'scrapy' is not recognized as an internal or external command, operable program or batch file." – Adam Nov 08 '17 at 20:02

1 Answers1

1

When you run scrapy startproject tutorial from terminal, the scrapy executable file will be executed. So first, find out where the scrapy executable file is located, change to that directory(c:\Anaconda directory for example) and run the command:

scrapy startproject tutorial

or run scrapy from a absolute path like this:

/Library/Frameworks/Python.framework/Versions/3.6/bin/scrapy startproject tutorial

or like this:

c:/path/scrapy.exe scrapy startproject tutorial

Adam
  • 405
  • 1
  • 5
  • 22
ilovecomputer
  • 4,238
  • 1
  • 20
  • 33
  • `c:\Anaconda\pkgs\scrapy-1.4.0-py36h764da0a_1\Scripts>scrapy startproject tutorial` `Unable to create process using 'c:\Anaconda\pkgs\scrapy-1.4.0-py36h764da0a_1\python.exe c:\Anaconda\pkgs\scrapy-1.4.0-py36h764da0a_1\Scripts\scrapy-script.py startproject tutorial'` – Adam Nov 09 '17 at 13:37
  • Thanks, the 1st suggestion yielded the above but the 2nd suggestion worked out. – Adam Nov 09 '17 at 13:53