Jump to content


Photo

Need some python modules to be installed


  • Please log in to reply
9 replies to this topic

#1 iamsj

iamsj

    Newbie

  • Members
  • 7 posts

Posted 06 August 2019 - 01:32 PM

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


#2 flazepe1

flazepe1

    Rank VII Member

  • Moderators
  • 529 posts
  • Gender:Male

Posted 06 August 2019 - 02:04 PM

This support request is being escalated to our root admin.

#3 iamsj

iamsj

    Newbie

  • Members
  • 7 posts

Posted 07 August 2019 - 07:35 PM

Can you please just tell me how to do it? I will do it myself.



#4 wolstech

wolstech

    Rank X Member

  • Root Admin
  • 10,632 posts
  • Gender:Male
  • Location:Pennsylvania

Posted 07 August 2019 - 08:24 PM

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.

Please do not PM me for support. Posting on our forums lets all of us learn.
Do you play Minecraft? | Server Monitors | And the Dumbass of the Decade award goes to...


#5 Krydos

Krydos

    Rank X Member

  • Root Admin
  • 18,214 posts
  • Gender:Male

Posted 08 August 2019 - 02:24 AM

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?

#6 badrihippo

badrihippo

    Rank I Member

  • Members
  • Pip
  • 26 posts

Posted 08 August 2019 - 01:27 PM

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.



#7 Krydos

Krydos

    Rank X Member

  • Root Admin
  • 18,214 posts
  • Gender:Male

Posted 08 August 2019 - 06:15 PM

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.

#8 iamsj

iamsj

    Newbie

  • Members
  • 7 posts

Posted 10 August 2019 - 01:00 PM

Sorry for replying this late, I was not receiving any email notifications. I am using Python 3.6 by the way.



#9 sohamb03

sohamb03

    Rank V Member

  • Members
  • PipPipPipPipPip
  • 392 posts
  • Gender:Male
  • Location:India
  • Interests:Web Designing

Posted 10 August 2019 - 01:16 PM

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.

Sayan Bhattacharyya


#10 iamsj

iamsj

    Newbie

  • Members
  • 7 posts

Posted 10 August 2019 - 01:18 PM

Oh, now I see. I thought I would be automatically subscribed to the topic. Just followed it manually.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users