Eomys / pyleecan

Electrical engineering open-source software providing a user-friendly, unified, flexible simulation framework for the multiphysic design and optimization of electrical machines and drives
https://www.pyleecan.org
Apache License 2.0
156 stars 130 forks source link

Installation issue #542

Closed fixundfoxi1 closed 2 years ago

fixundfoxi1 commented 2 years ago

Hi, while installing pyleecan most of the installation process runs through however it stops with following message: Using cached deap-1.3.1.tar.gz (1.1 MB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [1 lines of output] error in deap setup command: use_2to3 is invalid. [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

Any idea? Thanks for your help!

BonneelP commented 2 years ago

Hello,

Thank you for your interest in pyleecan.

If I understand correctly, it seems that pip doesn't manage to install deap 1.3.1. As a first solution, you can try to run directly "pip install deap" with administrator rights. 1.3.1 is the latest version and I'm using it on a Python 3.8 so there should be no reason why it can't be installed. Which version of python are you using ? Once deap installed you can run "pip install pyleecan" again.

As a further response to your issue, I'm experimenting "optional" dependency. deap is in fact not mandatory any more in pyleecan. This package enables to run NSGA2 optimization, we now have Bayes optimization with smoot as well. So as a test I have removed deap and smoot from the mandatory dependencies from pyleecan (to enable to choose which package to use). They are listed in the "full" list, pip install pyleecan would install the smallest number of package and pip install pyleecan[full] the complete list (normal + deap + smoot + gmsh).

So technically, the "pip install deap" from the first solution could not be required if you don't plan to use NSGA2 optimization.

@SebGue What do you think of this new organization (I'm taking inspiration from what we did for https://github.com/Eomys/MoSQITo) ? It's an experimentation before 1.4.0. By the way I'm currently working on updating all the tutorials, then I plan to update the website and the "how to install page".

Best regards, Pierre

fixundfoxi1 commented 2 years ago

Hi, while installing pyleecan most of the installation process runs through however it stops with following message: Using cached deap-1.3.1.tar.gz (1.1 MB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [1 lines of output] error in deap setup command: use_2to3 is invalid. [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

Any idea? Thanks for your help!

fixundfoxi1 commented 2 years ago

Thank you, Pierre, at least the installation went through now when switching from Python 3.10 to 3.8. I am still facing issues with the "Draw in FEMM" command leading to an error message like this:

[15:04:53] Error while drawing machine Toyota_Prius in FEMM: (-2147352567, 'Ausnahmefehler aufgetreten.', (61704, 'femm', 'Interner Anwendungsfehler.', None, 0, 0), None)

I have re-installed femm and as well pyfemm but got stuck at this point. Any experience with this message? Thanks!

BonneelP commented 2 years ago

Hello,

Glad to know that you managed to install pyleecan :) We plan to move to upper python version in the near future. I haven't seen this message before :/ Are you using windows or Linux ? We still have to work on the compatibility with Linux cf issue #104 (hopefully there was an update that should enable to do it now)

Best regards, Pierre

SebGue commented 2 years ago

Hello @BonneelP

sorry for my late response. Do you mean optional dependencies by new organisation? That seems reasonable. Or is there anything else new to mosquito, since I don't follow this project.

Best regards, Sebastian

BonneelP commented 2 years ago

Yes I was referring to the optional dependencies.

BonneelP commented 2 years ago

Hello, I just released pyleecan 1.4.0 that includes the optional dependencies installation and I have updated the website. I'm closing this issue, if you need further help you can reopen it. Best regards, Pierre