Forums

Installing Report Lab

pls any idea on how to install report Lab on python 3.5 ? i installed it but whjen i went back to my programs it tells me report lab need to be install

how did you run your program? is it running in python 3.5? is it using a virtualenv? and how did you install into python3.5? (eg: was it pip3.5? or by activating a virtualenv?)

yeah it is running python 3.5 and using virtualenv. i used pip3 to install the report lab. but i got the same result.

Did you set up your web app to use virtualenv?

yeah i think in pythonanywhere its set automatically

No, you need to set it in the Web page in "Virtualenv" section.

i am still new in python can you please give me a hint on how to set the Web page in "Virtualenv"

When you're logged into your PA account, go to the Web page (it's linked in the upper right menu), find "Virtualenv" section on this page and insert the path to your virtual environment after clilcking on the "Enter path to a virtualenv, if desired" field.

thanks i ve entered the path as you suggested but when i go to the site it says it doesnt exist so i ve to delete the path i added. i then used pip3.5 install --user ReportLab to install the labreport in bash console but still the lapreport is not running is giving me this error "python needs reportlab module installed for pdf export" pls what can i do

When using --user install you are installing the package to .local directory, not to your virtual environment.

ok is there a way of taking reportLab to virtual environment

Sure, just activate the virtualenv using the "workon" command in bash, then "pip install reportlab" without the "--user" option.

thanks giles is there anyway i can install reportlab and use it without using virtualenv i don't seem to get it right in virtualenv because my app is showing error.

If by "app" you mean a web app, you need to set it up to use a vritualenv (in the Web page, "Virtualenv" section). If you install packages with --user flag, on the other hand, make sure that your app is using the same Python version which you used for installing the module.