Why can I run command `scrapy` from mac terminal but not IDLE? - python-2.7

I've downloaded Scrapy via pip and am trying to confirm its successfully installed.
If type scrapy into the mac terminal it provides the version name, usage, and available commands, so it appears to have installed successfully,
But if type scrapy or import scrapy into IDLE shell, it returns an error.
Traceback (most recent call last): File "<pyshell#14>", line 1, in <module>
scrapy NameError: name 'scrapy' is not defined
And
Traceback (most recent call last):
File "<pyshell#18>", line 1, in <module>
import scrapy
ImportError: No module named scrapy
What I've tried:
import sys
sys.path
And there is no scrapy in the printout. So I thought it might be a PATH issue.
So per these docs (http://doc.scrapy.org/en/latest/intro/install.html),
I tried running running,
echo "export PATH=/usr/local/bin:/usr/local/sbin:$PATH" >> ~/.bashrc
But that results in an error.
SyntaxError: invalid syntax
I'm not really sure where to go with this from here and don't have much experience with python.
Could anyone share ideas that might troubleshoot this?

Related

Flask db migrate stops working on a new ec2 machine

So this is a bit weird. I took an image of my dev server (ec2), spooled it up onto a new machine, and all of a sudden "flask db migrate" stopped working for me. It now returns this error:
Traceback (most recent call last):
File "/usr/local/bin/flask", line 7, in <module>
from flask.cli import main
ImportError: No module named cli
I'm not particularly sure how to go about debugging this. A little guidance would be deeply appreciated.

Trouble getting a Python script to execute

I am trying to experiment around with brute forcing Bitcoin Brain Wallets via a Python script I pulled from github. How ever I am unable to get the script to run properly. I cannot get the requirements to install properly and running the script without returns:
Traceback (most recent call last):
File "C:\Users\CCTrollz\Desktop\bruteforce-bitcoin-brainwallet-master\bbb.py", line 7, in <module>
from lib.blockchain import Abe, BlockchainInfo, Insight
File "C:\Users\CCTrollz\Desktop\bruteforce-bitcoin-brainwallet-master\lib\blockchain.py", line 2, in <module>
import requests
ImportError: No module named requests
Github Project

"ImportError: No module named path" showing when running software in ubuntu 12.04

I am running one software in ubuntu 12.04. It requires python. I have python 2.7.3 on ubuntu. When try to run command ./cmdsadit sim -c ./Example/SimExample.py it shows following
jayram#ubuntu:~/sadit$ ./cmdsadit sim -c ./Example/SimExample.py
[warning] socketIO_client is not found. Real-time ability is disabled
--> Use [matplotlib] as plot backend
--> [warning] cannot import sql related function, reading for sql server is not supported
WARNING:util:Cannot find [socketIO_client], real-time ability is disabled.
WARNING:util:Cannot import sql related function, reading for sql server is not supported
Traceback (most recent call last):
File "fs.py", line 10, in <module>
from networkx.algorithms.traversal.path import single_source_dijkstra_path, dijkstra_path_length
ImportError: No module named path
jayram#ubuntu:~/sadit$
Some initial line screenshot of fy.py file is given below
How do I solve this error?
The error is self explanatory, your import from path module is incorrect
It should be
from networkx.algorithms import single_source_dijkstra_path, dijkstra_path_length

Virtual env Python packages with Google Cloud SDK

I'm in the Getting Started section of Google Cloud SDK from Dan Sanderson's book, sorry no link.
The thing is I created a clock application with the local installation of Python.
Then I created a virtual environment, and ran the same application with the corresponding installation.
I installed the packages that I needed, but I get a strange error about -what I think- is one of the base Python packages.
(myenv) diego#host:gae-clock$ dev_appserver.py .
Traceback (most recent call last):
File ".../google-cloud-sdk/bin/dev_appserver.py", line 11, in <module>
import bootstrapping.bootstrapping as bootstrapping
File ".../google-cloud-sdk/bin/bootstrapping/bootstrapping.py",
line 9, in <module>
import setup
ImportError: No module named 'setup'
thank you for pointing in the right direction. Please let me know if I can show more to track this down.

Error when trying to authenticate in Rackspace

I have got Following code from Rackspace Documentation.
import pyrax
pyrax.set_setting("identity_type", "rackspace")
pyrax.set_default_region('ORD')
pyrax.set_credentials('ot7336', '2755cd822321335191c8cc3ab46bbcff')
but when i run the module I get following error message
Traceback (most recent call last):
File "C:/Python27/rackspaceFileDownload.py", line 1, in <module>
import pyrax
ImportError: No module named pyrax
I have downloaded pyrax from this link https://github.com/rackspace/pyrax/
Unzipped it and installed it in windows in CMD using "setup.py install"