Jump to content

[Inactive] Need some python modules to be installed


iamsj

Recommended Posts

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
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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