{"id":7794,"date":"2015-10-27T08:19:33","date_gmt":"2015-10-27T08:19:33","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/10\/27\/how-to-install-portia-a-python-application-from-github-mac-open-source-projects-scrapinghub-portia\/"},"modified":"2015-10-27T08:19:33","modified_gmt":"2015-10-27T08:19:33","slug":"how-to-install-portia-a-python-application-from-github-mac-open-source-projects-scrapinghub-portia","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/10\/27\/how-to-install-portia-a-python-application-from-github-mac-open-source-projects-scrapinghub-portia\/","title":{"rendered":"How to install portia, a python application from Github (Mac)-open source projects scrapinghub\/portia"},"content":{"rendered":"<p><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/f2e2d90387d2d8d14b29e00014eb829d?s=128&amp;d=identicon&amp;r=PG&amp;f=1\" \/> <strong>down4keeps<\/strong><\/p>\n<p>I don&#8217;t have the rep to upvote Alagappan&#8217;s answer but he&#8217;s correct. Also, if you&#8217;re as inexperienced as I am, you may need further clarity on this.<\/p>\n<p>You have to create, activate and <strong><em>navigate into<\/em><\/strong> the virtualenv before installing anything (including cloning portia from github). Here&#8217;s the whole thing working from start to finish:<\/p>\n<p><strong>1: cd<\/strong> <em>to wherever you\u2019d like to store your project&#8230; and<\/em> <strong>Install virtualenv<\/strong>:<\/p>\n<pre><code>$ pip install virtualenv\n<\/code><\/pre>\n<p><strong>2: Create the virtual environment.<\/strong> <em>(I called mine \u201cportia\u201d but this can be anything.)<\/em>:<\/p>\n<pre><code>$ virtualenv portia\n<\/code><\/pre>\n<p><strong>3: Activate the virtual environment you created<\/strong> <em>(change the path to reflect the name you used here if not \u201cportia\u201d.)<\/em>:<\/p>\n<pre><code>$ source portia\/bin\/activate\n<\/code><\/pre>\n<p><em>At this point your terminal should have display the virtualenv name in parenthesis before the standard directory path prompt:<\/em>\u2028 <code>(name-of-virtualenv) [your-machine]:[current-directory]: [user]$<\/code> <em>&#8230;and if you list the files within your pwd you\u2019ll see the name of you virtualenv there.<\/em><\/p>\n<p><strong>4: cd into your virtualenv (\u201cportia\u201d for me):<\/strong><\/p>\n<pre><code>$ cd portia\n<\/code><\/pre>\n<p><strong>5: Now you can clone portia from github into your virtualenv&#8230;<\/strong><\/p>\n<pre><code>$ git clone https:\/\/github.com\/scrapinghub\/portia\n<\/code><\/pre>\n<p><strong>6: cd into the cloned portia\/slyd&#8230;<\/strong><\/p>\n<pre><code>$ cd portia\/slyd\n<\/code><\/pre>\n<p><strong>7\/8: pip install twisted and Scrapy&#8230;<\/strong><\/p>\n<pre><code>$ pip install twisted\n$ pip install Scrapy\n<\/code><\/pre>\n<p><em>You\u2019re virtualenv should still be activated and you should still be in [virtualenv-name]\/portia\/slyd<\/em><\/p>\n<p><strong>9: Install the requirements.txt:<\/strong><\/p>\n<pre><code>$ pip install -r requirements.txt\n<\/code><\/pre>\n<p><strong>10: Run slyd:<\/strong><\/p>\n<pre><code>$ twistd -n slyd\n<\/code><\/pre>\n<p><em>&#8212; No more scrapy error! &#8212;<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>down4keeps I don&#8217;t have the rep to upvote Alagappan&#8217;s answer but he&#8217;s correct. Also, if you&#8217;re as inexperienced as I am, you may need further clarity on this. You have to create, activate and navigate into the virtualenv before installing anything (including cloning portia from github). Here&#8217;s the whole thing working from start to finish: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7794","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7794"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7794\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}