title: no module named requests
body: <p>I will first state I have searched for this problem, and found the exact same problem here ( <a href="https://stackoverflow.com/questions/16265368/importerror-no-module-named-requests">ImportError: No module named &#39;requests&#39;</a> ) but that hasn't helped me.</p>
  
  <p>I am using macports on osx (mountain lion). I have successfully installed and run a few scripts without any issues. </p>
  
  <p>from the macports page, I have installed <code>requests</code> via the method it detailed and as far as I can tell, it has installed successfully:</p>
  
  <pre><code>daves-mbp:~ Dave$ port search requests
  arpwatch @2.1a15 (net)
      Monitor ARP &amp; RARP requests
  
  http_ping @29jun2005 (net, www)
      Sends HTTP requests every few seconds and times how long they take
  
  httping @2.0 (net, www)
      Ping-like tool for http-requests
  
  py-requests @1.2.3 (python, devel)
      Python HTTP for Humans.
  
  py26-requests @1.2.3 (python, devel)
      Python HTTP for Humans.
  
  py27-requests @1.2.3 (python, devel)
      Python HTTP for Humans.
  
  py31-requests @1.2.3 (python, devel)
      Python HTTP for Humans.
  
  py32-requests @1.2.3 (python, devel)
      Python HTTP for Humans.
  
  py33-requests @1.2.3 (python, devel)
      Python HTTP for Humans.
  
  webredirect @0.3 (www)
      small webserver which redirects all requests
  
  Found 10 ports.
  </code></pre>
  
  <p>I have python 2.7, so I installed it via:</p>
  
  <pre><code>daves-mbp:~ Dave$ sudo port install py27-requests
  Password:
  ---&gt;  Computing dependencies for py27-requests
  ---&gt;  Fetching archive for py27-requests
  ---&gt;  Attempting to fetch py27-requests-1.2.3_0.darwin_12.noarch.tbz2 from http://jog.id.packages.macports.org/macports/packages/py27-requests
  ---&gt;  Attempting to fetch py27-requests-1.2.3_0.darwin_12.noarch.tbz2.rmd160 from http://jog.id.packages.macports.org/macports/packages/py27-requests
  ---&gt;  Installing py27-requests @1.2.3_0
  ---&gt;  Activating py27-requests @1.2.3_0
  ---&gt;  Cleaning py27-requests
  ---&gt;  Updating database of binaries: 100.0%
  ---&gt;  Scanning binaries for linking errors: 100.0%
  ---&gt;  No broken files found.
  daves-mbp:~ Dave$ 
  </code></pre>
  
  <p>I think that looks good. Using macports is there something else I have to do before using it? I thought the <code>python setup.py install</code> (in the aforementioned post) may have solved my problem, however, when I search for <code>requests</code> in my filesystem, the only reference is burried in a path (that macports says is a store for user installed modules. And besides, there is no setup.py within that or it's parent directory. </p>
  
  <p>I have restarted my terminal window (that fixed another problem earlier), but it made no difference here.</p>
  
  <p>Any help is appreciated</p>
  
  <p>edit:</p>
  
  <p><code>which python</code> reports /opt/local/bin/python </p>
  
  <p>the first lines of the python interpreter DID report:
      daves-mbp:~ Dave$ python 
      Python 2.7.2 (default, Jun 20 2012, 16:23:33) 
      [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin</p>
  
  <p>but now I have done something and it's responding with new errors:</p>
  
  <pre><code>daves-mbp:~ Dave$ python
  Traceback (most recent call last):
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 548, in &lt;module&gt;
      main()
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 530, in main
      known_paths = addusersitepackages(known_paths)
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 266, in addusersitepackages
      user_site = getusersitepackages()
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 241, in getusersitepackages
      user_base = getuserbase() # this will also set USER_BASE
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 231, in getuserbase
      USER_BASE = get_config_var('userbase')
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 516, in get_config_var
      return get_config_vars().get(name)
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 449, in get_config_vars
      import re
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 105, in &lt;module&gt;
      import sre_compile
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_compile.py", line 14, in &lt;module&gt;
      import sre_parse
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_parse.py", line 17, in &lt;module&gt;
      from sre_constants import *
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_constants.py", line 18, in &lt;module&gt;
      from _sre import MAXREPEAT
  ImportError: cannot import name MAXREPEAT
  </code></pre>