سؤال

I am new to python. I am trying to install scrapy on mac through the terminal. I am getting the following errors. Let me know what i need to do to install:

>>> pip install scrapy
  File "<stdin>", line 1
    pip install scrapy
              ^
SyntaxError: invalid syntax

Thanks V

هل كانت مفيدة؟

المحلول

You're trying to do this in an interactive Python session, but it needs to be done in the terminal outside of the Python session.

Also, depending on how your system is set up you'll probably need to use sudo, as follows:

$ sudo pip install scrapy

نصائح أخرى

You should try and install it into a virtual environment, i don't even have to use sudo when installing in one.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top