esa / pykep

PyKEP is a scientific library providing basic tools for research in interplanetary trajectory design.
http://esa.github.io/pykep/
GNU General Public License v3.0
339 stars 96 forks source link

DLL load failed #126

Closed Ruida-Xie closed 4 years ago

Ruida-Xie commented 4 years ago

Hi Dario&Team,

I've been trying this all day.

So my system is Win10 64-bit and I used Miniconda3 to install. And I think that's a success.

When I did the test run-'import pykep', it gave me the following:

image

I tried other versions of python, it give me the same error message

So I just want to ask if pykep works on Windows10? Or I need to run it in the Linux system?

If it do works in Windows10 environment, how do I solve this problem?

Ray

darioizzo commented 4 years ago

yes pykep should work on windows system as conda builds and tests succesfully the package on its virtual machines. occasionally some of the dependencies change which may break the import .. but that I know currently this is not the case

anyway, I do not have a windows system and cannot test whats the current status.

Ruida-Xie commented 4 years ago

Thank you for the response.

I managed to re-install pykep using miniconda on another machine. And I use conda-packaged python. This time when I typed in 'import pykep', it doesn't give me mistake message. But when I tried to run 'pykep.test.run_test_suite()', it showed:

Python 3.7.6 | packaged by conda-forge | (default, Jun 1 2020, 18:11:50) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

import pykep pykep.test.run_test_suite() Traceback (most recent call last): File "", line 1, in AttributeError: module 'pykep' has no attribute 'test' pykep <module 'pykep' from 'D:\miniconda3\lib\site-packages\pykep\init.py'>

This problem might be stupid cause I not familiar with python(mostly using matlab). I guess I messed up the environment path setting, or I just get luck that 'import pykep' doesn't produce any mistake. I checked the solved problem but I didn't see anyone come across this. I appreciate any idea on how to solve this.

Cheers, Ray

darioizzo commented 4 years ago
from pykep import test
pykep.test.run_test_suite()

let me know

Ruida-Xie commented 4 years ago

Solved! Seems I really need some python basics Many thanks!

Regards, Ray

darioizzo commented 4 years ago

Its actually a complicated thing that is not obvious as it has to to with how python imports modules ..... and it applies to pykep as thats how I wrote the module. Other modules may import the test namespace also when import pymodule ...

It should be documented in the pykep pages ...