Jump to content

Recommended Posts

Posted

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
Posted

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.

Posted

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?

Posted

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 file

If 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.

Posted

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.

Posted

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.

Guest
This topic is now closed to further replies.
×
×
  • Create New...