2

I am using the rauth library in my Flask app. The error log shows the error

ImportError: No module named rauth. 

How to deal with this problem.

4
  • did you install the rauth ? install rauth using pip install rauth Commented Apr 9, 2015 at 12:28
  • It says error: could not create '/usr/local/lib/python2.7/dist-packages/rauth': Permission denied Commented Apr 9, 2015 at 12:37
  • Either use sudo pip install rauth, or consider creating a virtualenv instead. Commented Apr 9, 2015 at 12:44
  • Using sudo gives the output sudo:unkown user: root Commented Apr 9, 2015 at 12:46

2 Answers 2

3

According to the documentation of PythonAnywhere on how to install custom packages, you have to instruct pip to install into your home directory:

pip install --user rauth
Sign up to request clarification or add additional context in comments.

2 Comments

PythonAnywhere dev here. You don't actually need your username on that command line -- just the --user flag, ie pip install --user rauth. It's a slightly confusingly named option for pip that tells it to install stuff in your home directory rather than trying to write to the global system libraries.
@GilesThomas thanks for the clarification, that's what you get for just skimming the docs. I updated my answer from original pip install --user <your_username> rauth for anyone looking this up in the future
1

To install rauth please do

python -m pip install rauth

If its giving permission denied error while installing then It seems the user as which you are logged in to the system has no permission to access the file. Please login to system as a user who has all permission to acess files i mean to say login as the system's main admin and then try.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.