I am trying to add an external python library from a third party software 
into Spyder so I can work with it. I have already tried the following:

 - Adding library path containing .py files to Tools>PYTHONPATH manager
 - Synchronizing the path
 - Updating module names list through Tools>Update Module names list

However, when I try to import modules from this library I get two types of 
errors:

    import easy
    Traceback (most recent call last):
    
      File "<ipython-input-2-685519d35f15>", line 1, in <module>
        import easy
    
      File "C:\Program Files (x86)\Plaxis\PLAXIS 2D\plxscripting\easy.py", 
line 24, in <module>
        from .server import Server, InputProcessor

ValueError: Attempted relative import in non-package


The second type of error as follows:

    from plxscripting.easy import *
    Traceback (most recent call last):
    
      File "<ipython-input-1-a40c101d3bb0>", line 1, in <module>
        from plxscripting.easy import *
    
    ImportError: No module named plxscripting.easy

I don't understand why Spyder is not recognizing these libraries. The path 
has been added and shows up on the manager. What constitutes a python 
module? Is it not just  the .py file with module name prefix? Is not the 
path sufficient to work with the library through the IDE?

-- 
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to spyderlib+unsubscr...@googlegroups.com.
To post to this group, send email to spyderlib@googlegroups.com.
Visit this group at https://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.

Reply via email to