omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    can PyTorch be in Pythonista ?

    Pythonista
    data science pytorch deep learning
    2
    2
    4754
    Loading More Posts
    • 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.
    • SmartGoat
      SmartGoat last edited by

      hey everyone, I'm wondering if it is possible to install pytorch in pythonista cause the only dependencies are respectively numpy (already in pythonista) and pillow which, as i read, is pure python.
      To install pytorch, you need to install 2 modules: torchvision and torch. Torchvision install itself without problems, but torch isn't found in pip stash:

      [~/Documents]$ pip install torch
      Querying PyPI ... 
      Error: Source distribution not available for torch: 1.0.0
      

      which is strange because this is the command given by the official site for installing it on MacOS.
      Also, I can't install Pillow because of this other error:

      [~/Documents]$ pip install pillow
      Querying PyPI ... 
      Downloading package ...
      Opening: https://files.pythonhosted.org/packages/f7/d6/00368fe7f9acb9454ba5a75a1edda97b7ee9cfe399af4acb6489466be37e/Pillow-5.4.0.tar.gz
      
      Save as: /private/var/mobile/Containers/Data/Application/89F819E6-6ADB-4FBD-B2AC-889B8BDFCBA3/tmp//Pillow-5.4.0.tar.gz (15929265 bytes)
        15929265  [100.00%]
      Extracting archive file ...
      Archive extracted.
      Running setup file ...
      TypeError("unsupported operand type(s) for +: 'OmniClass' and 'list'",)
      Failed to run setup.py
      Fall back to directory guessing ...
      Error: Cannot locate packages. Manual installation required.
      

      Does anyone have an idea ? it would be really interesting to dive in cause pytorch seems to be the only package which can provide high level deep learning/data science with pure python....
      Thanks in advance for help !

      1 Reply Last reply Reply Quote 0
      • bennr01
        bennr01 last edited by bennr01

        @SmartGoat StaSh pip can only install pure python packages, which means no packages containing or depending on c code.
        pytorch appears to have such c dependencies.
        Take a look at torch's pypi file page. The filename indicates that each distribution of the torch package is for a specific OS and architecture.
        StaSh pip can only install source distributions, either as .tar.gz, .zip, ... or source wheels (wheels containing none-any in its name).
        The same is true for pillow. However, IIRC, it may already be included in Pythonista by default.

        **Edit: ** A quick search showed npdl as a possible pure-python deeplearning package. It installs successfully using StaSh.

        1 Reply Last reply Reply Quote 2
        • First post
          Last post
        Powered by NodeBB Forums | Contributors