No module named 'requests_toolbelt'
16,498
Solution 1
I had the same issue, and my solution was that
the package was installed by
root
user
and after changing the access properties of the files, it worked fine.
The command I specifically issued (on ubuntu-like system) was:
sudo chown $USER.$USER -R ~/.local/lib/python3.7/site-packages/
Solution 2
Have you tried to install the package using your command line? Navigate your command line to the path where you have python installed:
>path\easy_install.exe requests_toolbelt
or
>path\easy_install.exe requests-toolbelt
or
>path\python -m pip install requests_toolbelt
Hopefully this helps you
Solution 3
Try installing requests-toolbelt. Use below command to do that.
# pip install requests-toolbelt
Author by
Isaac
Updated on June 13, 2022Comments
-
Isaac almost 2 years
So, I'm trying to upload my python app to heroku but when I use a script with 'requests_toolbelt' it says is not found.
Here my log:
Traceback (most recent call last): File "girl.py", line 12, in <module> from Coffe import CoffeAPI File "/app/CoffeAPI/__init__.py", line 29, in <module> from requests_toolbelt import MultipartEncoder ImportError: No module named 'requests_toolbelt'
Here my requeriments.txt:
requests-toolbelt==0.7.1 moviepy==0.2.2.11 requests==2.13.0
Do I need an specific buildpack to run 'requests_toolbelt'?