• Login
Community
  • Login

Python Module Not Found

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
modulenumpypython
5 Posts 4 Posters 2.4k Views
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.
  • R
    Ryan DeVine
    last edited by Jan 4, 2019, 8:07 PM

    So I am new to NPP and I am trying to use it as my main code editor for Python. However, I am having trouble importing numpy and seeing its auto-completion. Below is the code that I have already.

    print(‘Hello World’)

    import numpy as np

    np.

    After the np., I would like to see suggestions for different numpy methods. When I try to run the code there is an error on the import numpy as np line. The error is shown below.

    ImportError:
    Importing the multiarray numpy extension module failed. Most
    likely you are trying to import a failed build of numpy.
    If you’re working with a numpy git repo, try git clean -xdf (removes all
    files not under version control). Otherwise reinstall numpy.

    Original error was: DLL load failed: The specified module could not be found.

    Does anybody have any suggestions?

    Thank you!

    E A 2 Replies Last reply Jan 4, 2019, 8:13 PM Reply Quote 0
    • E
      Eko palypse @Ryan DeVine
      last edited by Jan 4, 2019, 8:13 PM

      @Ryan-DeVine

      the first question would be if you have numpy installed?
      The second, how do you run the script? Via run menu? NppExec? PythonScript??

      And autocompletion, most likely doesn’t work as expected as there is no such thing
      like LSP client available yet.

      1 Reply Last reply Reply Quote 1
      • A
        Alan Kilborn @Ryan DeVine
        last edited by Jan 4, 2019, 8:14 PM

        @Ryan-DeVine said:

        After the np., I would like to see suggestions for different numpy methods.

        Unfortunately, N++ doesn’t work that way with it.

        When I try to run the code there is an error on the import numpy as np line

        Well, that’s not Notepad++ related so this isn’t the best place to ask it.

        1 Reply Last reply Reply Quote 0
        • P
          PeterJones
          last edited by PeterJones Jan 4, 2019, 8:56 PM Jan 4, 2019, 8:56 PM

          @Ryan-DeVine ,

          Regarding the auto-completion: yeah, that would be awesome. Can you imagine how difficult the task would be of implementing such auto-completion for all the programming languages that Notepad++ natively supports (see the Language menu to see how many there are). From my vague knowledge of LSP (I’ve run across the term a few times, but never used an LSP-enabled system), I think that’s one of the problems that LSP addresses, but I’m not sure.

          For a specific use case (for example, just Python), someone might be able to code up a plugin or automation script (*) to do it, using something like, "check the current filetype: if it’s not python, exit the script; otherwise, parse this file and all the imported modules looking for functions and methods that it currently has access to; once that list is built, edit the AUTOCOMPLETE table to include those functions/methods; repeat ad infinitum. But that’s a pretty big task, too.

          *: there’s even a PythonScript plugin, where a python2.7 dll gets loaded into Notepad++, and gives that specific instance of python access to the internals of Notepad++. That would be pretty meta, making a python auto-complete gizmo that’s written in python, running inside Notepad++, which you could use while editing your other PythonScript scripts from inside of Notepad++. 🤯

          E 1 Reply Last reply Jan 4, 2019, 9:28 PM Reply Quote 1
          • E
            Eko palypse @PeterJones
            last edited by Eko palypse Jan 4, 2019, 9:28 PM Jan 4, 2019, 9:28 PM

            @PeterJones

            From my vague knowledge of LSP (I’ve run across the term a few times, but never used an LSP-enabled system), I think that’s one of the problems that LSP addresses, but I’m not sure.

            exactly, the goal is to have the “language” responsible to provide such information
            instead of reinventing the wheel by every editor. LSP defines just the protocol how
            a communication of a client and a server has to work, the editor implements
            the client part whereas some other instance provides the server part.

            1 Reply Last reply Reply Quote 2
            4 out of 5
            • First post
              4/5
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors