• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Rahul Bodana

Blogger, Programmer & Trader

  • Code
  • Charm
  • Money
  • Write
Home » Code » How to Install Scrapy along with Virtual Environment

How to Install Scrapy along with Virtual Environment

September 3, 2020

Scrapy is a Python module and in order to use it, we first need to install python in our Computer/Laptop.

If the python is already installed in your machine then you can Go ahead and start installing Scrapy on your Computer, If not then you can Read How to Install Python in windows, MAC, Linux, Android, or iOS operating system.

How to install scrapy

If you are not sure that python is installed or not in your computer simply open the command prompt and type the following command there.

python -V

If it installed you will see the latest python version, If not it’ll display the error there.

Installing and setting up a virtual environment

It’s always a good idea to make a virtual environment for each of your different projects. In that way, you will know which modules that you actually need in case if you want to deploy to the server or something like this.

One of the simplest ways to use virtualenv to create a virtual environment.

  1. In your command prompt or PowerShell type this command for virtualenv installation.
pip install virtualenv
  1. This command will install virtualenv and all of its dependencies.
  1. Now its time to set up new virtualenv. To do this use this command.
    virtualenv virtual_workspace
    
  2. cd to virtual_workspace that we just created.
  3. Now to activate type this command
    Scripts\activate
    

How to Install Scrapy

  1. Make sure the virtual environment that we created is active. If not activate it.
  2. Use this pip command to install Scrapy in your virtual environment.
    pip install scrapy
    
  3. Wait till the Scrapy will install and once it does you can import and use its all of the features available.

Creating Scrapy project

  1. Once the scrapy installed, Now we can create the scrapy project on our computer.
  2. Navigate to the folder where you want to create a project in your terminal and type this command to create a project.
    scrapy startproject myproject
    
  1. Simply replace the myproject with the name of the project that you want.
  2. Now open our newly created project folder inside the Code editor of your choice and you can start working.

Share this:

  • Twitter
  • Facebook
  • Reddit
  • Pinterest
  • WhatsApp
  • More
  • Pocket
  • Telegram

Related Articles

Suggested Posts:

  • How to Install Python on Linux [Installation on Ubuntu]
  • 10 Best Python Books For Intermediate Programmers
  • How to Create Virtual Environment using Anaconda
  • How to Install Python on iOS Smartphones
  • How to Install Python on Windows 10/8/7 PC or Laptop
  • How to Install Anaconda on Windows Computer/Laptop/PC
  • How to Add Python in environmental variables to Windows…

Posted in: Code, Extras

Primary Sidebar

Recent Articles

  • PHP Inheritance: Concept, Override method, Modify & Final keyword
  • PHP Access Modifiers: Types of Specifiers, How to Use with Examples
  • PHP Constructor and Destructor: How to Create in PHP With Examples
  • PHP Classes & Objects: How to Create Classes and Objects in PHP
  • PHP OOP: What is OOP in PHP, Why use, PHP Classes and Objects
  • Evolution of Computers: History, Timeline, Ancient & Modern Computing devices
  • Introduction to Computer: Definition, Need & Functions of Computer

Copyright © 2022 by Rahul Bodana