Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. LAMP
  3. How to install Python external libraries?

How to install Python external libraries?

Scheduled Pinned Locked Moved Solved LAMP
4 Posts 2 Posters 996 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    why42
    wrote on last edited by
    #1

    Hi there,
    for a Python script I need the external Python library "Beautiful Soup" installed on the LAMP system. Trying to do so, I run in an error:

    pip3 install beautifulsoup4
    Defaulting to user installation because normal site-packages is not writeable
    Collecting beautifulsoup4
    Downloading beautifulsoup4-4.9.3-py3-none-any.whl (115 kB) 
    Collecting soupsieve>1.2; python_version >= "3.0"
    Downloading soupsieve-2.2-py3-none-any.whl (33 kB)
    Installing collected packages: soupsieve, beautifulsoup4
    ERROR: Could not install packages due to an EnvironmentError: [Errno 30] Read-only file system: '/root/.local'
    

    How would I solve this issue? I tried also:

    apt install python3-bs4
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    W: Not using locking for read only lock file /var/lib/dpkg/lock-frontend
    W: Not using locking for read only lock file /var/lib/dpkg/lock
    E: Unable to locate package python3-bs4
    

    So, I run out of options at the moment. Does anyone have a hint for me?
    Thanks in advance,
    why42

    1 Reply Last reply
    0
    • nebulonN Away
      nebulonN Away
      nebulon
      Staff
      wrote on last edited by
      #2

      Hi,

      apps on Cloudron run on a read-only root file system, so further system dependencies cannot be installed dynamically. Out of interest, how are you using python apps within the LAMP app?

      To resolve your issue, one option is to build your own app package with all the assets your app requires. We have some information with examples on this at https://docs.cloudron.io/custom-apps/guide/

      Also there is a forum section for app packaging https://forum.cloudron.io/category/96/app-packaging-development

      1 Reply Last reply
      0
      • W Offline
        W Offline
        why42
        wrote on last edited by
        #3

        Thanks nebulon for the quick reply.
        I just want to use a homegrown python script to run within the LAMP app. The Python script has some dependencies for external Python libraries like Beautiful Soup.
        So perhaps I am out of scope with my request for the LAMP app?

        nebulonN 1 Reply Last reply
        0
        • W why42

          Thanks nebulon for the quick reply.
          I just want to use a homegrown python script to run within the LAMP app. The Python script has some dependencies for external Python libraries like Beautiful Soup.
          So perhaps I am out of scope with my request for the LAMP app?

          nebulonN Away
          nebulonN Away
          nebulon
          Staff
          wrote on last edited by
          #4

          @why42 yes I think this would not be suiteable for LAMP. But having a custom app package for custom scripts is very much doable if you have used docker at some point. Otherwise we are happy to help.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Bookmarks
          • Search