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.


    Error message: module numpy ha no attribute array

    Pythonista
    4
    12
    2088
    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.
    • olife
      olife last edited by

      I get the message „module numpy ha no attribute array“ and how no idea how to solve this issue.

      I checked all known possibilities to solve the problem.
      There‘s no numpy.py file available I updated numpy and reinstall phytonista.

      I have no idea anymore

      mikael 1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by

        Go to Modules & Packages, then site-packages (or maybe site-packages-3), find the nupy folde, and delete it.

        You cannot update numpy on pythonista. Numpy is written in fortran. IOS does not have a fortran compiler, or allow you to compile without a developer key, or run code in an app signed by a different developer. So the only way to update numpy is for the developer to update, and that has not been a priority.

        1 Reply Last reply Reply Quote 0
        • mikael
          mikael @olife last edited by

          @olife, also, it has been noted before that numpy is so large package that, alrhough it is rare, something can go wrong in the import stage. Thus the first move when encountering a weird numpy import error is always restarting Pythonista.

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

            Thanks for answer, I try all these again, but it don‘t works. On iPhone it works. One week ago also on iPAD, but than something happens.

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

              Delete your numpy module in site packages, restart pythonista, make sure you don't have a file called numpy.py in the path that you are trying to import from.

              Then, force quit pythonista, import numpy, wait (don't hit "X"), and if you still have an error, copy the entire traceback and paste it back here. Numpy as delivered with pythonista lives in Modules/standard library 3.6/site-packages, which is not writable (unless you are jailbbroken), so if it worked before, it will work again :)

              If all else fails, copy stuff you want to keep from Documents to iCloud, then uninstall/reinstall pythonista, and copy back from iCloud. I think twice in many years, I have had some strange corruption in the write only areas that was only solved by a reinstall.

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

                Hi, thank you. I get following message if install numpy.
                „TypeError('can only concatenate list (not "OmniClass") to list',)
                Failed to run setup.py
                Fall back to directory guessing ...
                Package installed“

                I deleted Pythonista, Logout from cloud. After this I installed Pythonista again

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

                  Let's try this again....

                  ** DO NOT INSTALL NUMPY.**

                  Pythonista already comes with a version of numpy. It cannot be updated.

                  olife 2 Replies Last reply Reply Quote 1
                  • ccc
                    ccc last edited by

                    If you NEED current numpy, try https://pyto.app

                    1 Reply Last reply Reply Quote 1
                    • olife
                      olife last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • olife
                        olife @JonB last edited by

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • olife
                          olife @JonB last edited by olife

                          @JonB

                          Okay , thank you - after do all procedure again it works.

                          Happy 😃

                          But I’m wondering, because I work 2 month w/ self installed numpy. Same on my iPhone. Crazy .....

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

                            No, you never worked with a self installed numpy. If you imported numpy, then tried to install using stash/pip, you would have been able to keep using the old numpy until you force quit pythonista (or iOS kills it).

                            @bennr01 I thought pip had a blacklist now to prevent numpy installation?

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