{"id":993,"hash":"947d4220e8e85642daa9ead9e971c60803cc30a12800fea318bf3ed85e604636","pattern":"Error &quot;ImportError: No module named requests&quot;","full_message":"I tried importing requests:\n\nimport requests\n\nBut I get an error:\n\nImportError: No module named requests","ecosystem":"pypi","package_name":"python-requests","package_version":null,"solution":"Requests is not a built-in module (it does not come with the default Python installation), so you will have to install it:\n\nMac OS X and Linux\nPython 2: sudo pip install requests\n\nPython 3: sudo pip3 install requests\n\nif you have pip installed (pip is the package installer for Python and should come by default with your Python installation).\nIf pip is installed, but not in your path, you can use python -m pip install requests (or python3 -m pip install requests for Python 3)\n\nAlternatively, you can also use sudo easy_install -U requests if you have easy_install installed.\n\nLinux\nAlternatively you can use your systems package manager:\n\nFor CentOS: sudo yum install python-requests\n\nFor Debian/Ubuntu Python 2: sudo apt-get --reinstall install python-requests\n\nFor Debian/Ubuntu Python 3: sudo apt-get --reinstall install python3-requests\n\n--reinstall may fix this error, if package was already installed.\n\nWindows\nUse pip install requests (or pip3 install requests for Python 3) if you have  pip installed and Pip.exe added to the Path environment variable. If pip is installed, but not in your path, you can use python -m pip install requests (or python3 -m pip install requests for Python 3)\n\nAlternatively, from a command prompt, use > Path\\easy_install.exe requests, where Path is your Python*\\Scripts folder, if it was installed. (For example: C:\\Python32\\Scripts)\n\nIf you manually want to add a library to a Windows machine, you can download the compressed library, uncompress it, and then place it into the Lib\\site-packages folder of your python path. (For example: C:\\Python27\\Lib\\site-packages)\n\nFrom source (universal)\nFor any missing library, the source is usually available at https://pypi.python.org/pypi/. You can download requests here: https://pypi.python.org/pypi/requests\n\nOn Mac OS X and Windows, after downloading the source ZIP file, uncompress it and from the terminal/cmd, run python setup.py install from the uncompressed directory.\n\n(Source)","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/17309288/error-importerror-no-module-named-requests","votes":986,"created_at":"2026-04-19T04:52:09.109201+00:00","updated_at":"2026-04-19T04:52:09.109201+00:00"}