iamsj Posted August 6, 2019 Posted August 6, 2019 I tried installing a few modules by doing import pip pip.main(['install', '-r', 'requirements.txt']) but it didn't work. Can an admin please help regarding this? Given below is my requirements.txt file: 'scipy' 'WTForms', 'Flask_Login', 'numpy', 'SQLAlchemy', 'Werkzeug', 'alembic', 'Flask_Migrate', 'Flask_SQLAlchemy', 'Flask_WTF', 'Flask_Mail', 'Keras', 'SimpleITK', 'imageio', 'tensorflow' Thanks.my username is iamsj
Flaze Posted August 6, 2019 Posted August 6, 2019 This support request is being escalated to our root admin.
iamsj Posted August 7, 2019 Author Posted August 7, 2019 Can you please just tell me how to do it? I will do it myself.
wolstech Posted August 7, 2019 Posted August 7, 2019 You can’t, which is why this is in the escalated bin. Krydos is the only one who does this, so you’ll need to wait for him to see the request.
Krydos Posted August 8, 2019 Posted August 8, 2019 I think it's possible to upload the module source, and then load it from a path, but that's a lot of work, and it's easier to just install it globally for everyone to use. Which version of python are you using?
badrihippo Posted August 8, 2019 Posted August 8, 2019 I think it's possible to upload the module source, and then load it from a path, but that's a lot of work, and it's easier to just install it globally for everyone to use. Which version of python are you using? I can confirm this is possible; I've done it several times for my site for both Flask and Django. Rough steps:Remove all *.pyc files from your local Python package (or better, virtualenv) directory. This will usually look like [env directory or /usr]/lib/python[X.X]/site-packages/Upload the contents of aforementioned site-packages directory to a folder on the server (let's call it myenv)Add the lines import sys sys.path.insert(0, '/path/to/myenv')to the beginning of your script fileIf all goes well, your script should now be able to import libraries from your uploaded folder. Caveat: this works well for pure-Python libraries. For others, it'll only work if your system is compatible with your HelioHost server's architecture/setup.
Krydos Posted August 8, 2019 Posted August 8, 2019 Thanks for sharing the process for loading modules from a path. I suppose if you had a centos 7 vps or installed on your home pc you could probably even compile non python modules and they would probably work. It still seems like a lot more work than just making a post asking for it to be installed.
iamsj Posted August 10, 2019 Author Posted August 10, 2019 Sorry for replying this late, I was not receiving any email notifications. I am using Python 3.6 by the way.
Sn1F3rt Posted August 10, 2019 Posted August 10, 2019 Sorry for replying this late, I was not receiving any email notifications. I am using Python 3.6 by the way.You say you didn't receive email notification. Did you follow the topic? Only then do you receive email notifications.
iamsj Posted August 10, 2019 Author Posted August 10, 2019 Oh, now I see. I thought I would be automatically subscribed to the topic. Just followed it manually.
Recommended Posts