Closed MathieuPerrin closed 3 years ago
i think you have to change the environment variables of your winpython to locate the right c compiler for our cython code, BTW you can run the setup file it will generate a .pyd library for aestimosolver, try pip in your windows console it should look like this:
C:>pip install aestimo Collecting aestimo Downloading https://files.pythonhosted.org/packages/3e/71/4a7c1b9f76bda88fa874 d5f2ddf365b4a9edf74321e14f2bbb9cebaa6198/aestimo-2.0.2.tar.gz (1.9MB) 100% |████████████████████████████████| 1.9MB 312kB/s Requirement already satisfied: numpy>1.7.0 in e:\programs\wpy-3661\python-3.6.6. amd64\lib\site-packages (from aestimo) (1.14.5+mkl) Requirement already satisfied: matplotlib in e:\programs\wpy-3661\python-3.6.6.a md64\lib\site-packages (from aestimo) (2.2.2) Requirement already satisfied: scipy in e:\programs\wpy-3661\python-3.6.6.amd64\ lib\site-packages (from aestimo) (1.1.0) Requirement already satisfied: pytz in e:\programs\wpy-3661\python-3.6.6.amd64\l ib\site-packages (from matplotlib->aestimo) (2018.5) Requirement already satisfied: python-dateutil>=2.1 in e:\programs\wpy-3661\pyth on-3.6.6.amd64\lib\site-packages (from matplotlib->aestimo) (2.7.3) Requirement already satisfied: kiwisolver>=1.0.1 in e:\programs\wpy-3661\python- 3.6.6.amd64\lib\site-packages (from matplotlib->aestimo) (1.0.1) Requirement already satisfied: six>=1.10 in e:\programs\wpy-3661\python-3.6.6.am d64\lib\site-packages (from matplotlib->aestimo) (1.11.0) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in e:\pr ograms\wpy-3661\python-3.6.6.amd64\lib\site-packages (from matplotlib->aestimo) (2.2.0) Requirement already satisfied: cycler>=0.10 in e:\programs\wpy-3661\python-3.6.6 .amd64\lib\site-packages (from matplotlib->aestimo) (0.10.0) Requirement already satisfied: setuptools in e:\programs\wpy-3661\python-3.6.6.a md64\lib\site-packages (from kiwisolver>=1.0.1->matplotlib->aestimo) (39.2.0) Building wheels for collected packages: aestimo Running setup.py bdist_wheel for aestimo ... done Stored in directory: C:\Users\Dr-Hamza\AppData\Local\pip\Cache\wheels\c5\58\d8 \3c5596643788cd4a3b741345fb6ced2f2545124eb7b8d678af Successfully built aestimo Installing collected packages: aestimo Successfully installed aestimo-2.0.2 You are using pip version 10.0.1, however version 20.3b1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' comm and.
C:>
-Also get the latest Microsoft Visual C++ 14.0 installed. regards
@MathieuPerrin did you get it right?
Sorry for not answering, but in the end I developped a very basic 1 band simulation with Excel for this labwork. So I didn't try your advice and unfortunately I can't tell you if it works... Keep on your good and useful work !
I have tried the command pip install aestimo, but it failed as you can see in the terminal output given below. Probably this is due to not having a C compiler for cython. Maybe I'll try downloading one to see if it works, but this does not seem like the preferred installation as it is only mentionned in the news section of the web page. Also, I'd like to mention that setup.py is probably not up to date because of the line version='1.2.1'. I have not tried to run this setup.py file because I'm afraid of harming something in my python ditribution. Also, I'd like to use aestimo in the plugin way in order to follow the Jupyter notebooks tutorials that require it. I tried adding aestimo to the python path in these notebooks, but it did not work.
C:\WinPython\scripts>pip install aestimo Collecting aestimo Downloading https://files.pythonhosted.org/packages/3e/71/4a7c1b9f76bda88fa874d5f2ddf365b4a9edf74321e14f2bbb9cebaa6198/aestimo-2.0.2.t ar.gz (1.9MB) 100% |################################| 1.9MB 5.7MB/s Requirement already satisfied: numpy>1.7.0 in c:\winpython\python-3.5.2.amd64\lib\site-packages (from aestimo) (1.11.2+mkl) Requirement already satisfied: matplotlib in c:\winpython\python-3.5.2.amd64\lib\site-packages (from aestimo) (1.5.3) Requirement already satisfied: scipy in c:\winpython\python-3.5.2.amd64\lib\site-packages (from aestimo) (0.18.1) Requirement already satisfied: cycler in c:\winpython\python-3.5.2.amd64\lib\site-packages (from matplotlib->aestimo) (0.10.0) Requirement already satisfied: python-dateutil in c:\winpython\python-3.5.2.amd64\lib\site-packages (from matplotlib->aestimo) (2.5.3) Requirement already satisfied: pytz in c:\winpython\python-3.5.2.amd64\lib\site-packages (from matplotlib->aestimo) (2016.7) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,>=1.5.6 in c:\winpython\python-3.5.2.amd64\lib\site-packages (from matplotlib->a estimo) (2.1.10) Requirement already satisfied: six in c:\winpython\python-3.5.2.amd64\lib\site-packages (from cycler->matplotlib->aestimo) (1.10.0) Building wheels for collected packages: aestimo Running setup.py bdist_wheel for aestimo ... error Complete output from command c:\winpython\python-3.5.2.amd64\python.exe -u -c "import setuptools, tokenize;file='C:\Users\mathie u\AppData\Local\Temp\pip-install-3d1ke927\aestimo\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\ n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d C:\Users\mathieu\AppData\Local\Temp\pip-wheel-tws89d9d --pytho n-tag cp35: c:\winpython\python-3.5.2.amd64\lib\site-packages\Cython\Distutils\old_build_ext.py:30: UserWarning: Cython.Distutils.old_build_ext do es not properly handle dependencies and is deprecated. "Cython.Distutils.old_build_ext does not properly handle dependencies " running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.5 creating build\lib.win-amd64-3.5\aestimo copying aestimo.py -> build\lib.win-amd64-3.5\aestimo copying aestimo_dd_lib_setup.py -> build\lib.win-amd64-3.5\aestimo copying aestimo_eh.py -> build\lib.win-amd64-3.5\aestimo copying aestimo_poisson1d.py -> build\lib.win-amd64-3.5\aestimo copying config.py -> build\lib.win-amd64-3.5\aestimo copying database.py -> build\lib.win-amd64-3.5\aestimo copying database1.py -> build\lib.win-amd64-3.5\aestimo copying DDGelectron_driftdiffusion.py -> build\lib.win-amd64-3.5\aestimo copying DDGgummelmap.py -> build\lib.win-amd64-3.5\aestimo copying DDGhole_driftdiffusion.py -> build\lib.win-amd64-3.5\aestimo copying DDGnlpoisson.py -> build\lib.win-amd64-3.5\aestimo copying DDNnewtonmap.py -> build\lib.win-amd64-3.5\aestimo copying func_lib.py -> build\lib.win-amd64-3.5\aestimo copying intersubband_optical_transitions.py -> build\lib.win-amd64-3.5\aestimo copying main.py -> build\lib.win-amd64-3.5\aestimo copying main_iterating.py -> build\lib.win-amd64-3.5\aestimo copying profile.py -> build\lib.win-amd64-3.5\aestimo copying sample_double_qw.py -> build\lib.win-amd64-3.5\aestimo copying setup.py -> build\lib.win-amd64-3.5\aestimo copying setup_cython.py -> build\lib.win-amd64-3.5\aestimo copying VBHM.py -> build\lib.win-amd64-3.5\aestimo copying init.py -> build\lib.win-amd64-3.5\aestimo copying README.md -> build\lib.win-amd64-3.5\aestimo copying AUTHORS.md -> build\lib.win-amd64-3.5\aestimo copying COPYING.md -> build\lib.win-amd64-3.5\aestimo copying CHANGELOG.md -> build\lib.win-amd64-3.5\aestimo copying psi_at_inf_cython.pyx -> build\lib.win-amd64-3.5\aestimo copying psi_at_inf_cython.c -> build\lib.win-amd64-3.5\aestimo copying aestimo_dd_lib.pyx -> build\lib.win-amd64-3.5\aestimo copying aestimo_dd_lib.c -> build\lib.win-amd64-3.5\aestimo copying aestimo_dd_lib.pyd -> build\lib.win-amd64-3.5\aestimo creating build\lib.win-amd64-3.5\aestimo\tutorials copying tutorials\Aestimo_Tutorial.html -> build\lib.win-amd64-3.5\aestimo\tutorials copying tutorials\Aestimo_Tutorial.ipynb -> build\lib.win-amd64-3.5\aestimo\tutorials copying tutorials\Aestimo_tutorial2.html -> build\lib.win-amd64-3.5\aestimo\tutorials copying tutorials\Aestimo_tutorial2.ipynb -> build\lib.win-amd64-3.5\aestimo\tutorials copying tutorials\Aestimo_tutorial3.html -> build\lib.win-amd64-3.5\aestimo\tutorials copying tutorials\Aestimo_tutorial3.ipynb -> build\lib.win-amd64-3.5\aestimo\tutorials copying tutorials\Aestimo_tutorial4.html -> build\lib.win-amd64-3.5\aestimo\tutorials copying tutorials\Aestimo_tutorial4.ipynb -> build\lib.win-amd64-3.5\aestimo\tutorials creating build\lib.win-amd64-3.5\aestimo\examples copying examples\samples.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_1qw_barrierdope_ingaas.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_2qw_barrierdope_ingaas.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_2qw_InGaAS_GaAs.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_2qw_InGaN_GaN_vs_1ddcc.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_double_qw.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_double_qw_isbt.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_moddop.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_mqw_barrierdope_p_ingan.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_mqw_barrierdope_p_ingan_2.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_multi_qw_barrierdope_p.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_multi_qw_barrierdope_p2.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_multi_qw_barrierdope_p_ingan.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_pn.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_pn2.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_pn3.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope_ingaas.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope_ingan.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope_ingan_2.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope_p.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope_p_AlGaInN.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope_p_AlGaInN_2.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope_p_algan_gan_heterojunction.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope_p_cdzno.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope_p_ingaas.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope_p_InGaAsP.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_HarrisonCh3_3.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_HarrisonCh3_5.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_periodic_potential.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_qwdope.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_wide_isbt.py -> build\lib.win-amd64-3.5\aestimo\examples running build_ext skipping 'psi_at_inf_cython.c' Cython extension (up-to-date) building 'aestimo.psi_at_inf_cython' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visua l-cpp-build-tools
Failed building wheel for aestimo Running setup.py clean for aestimo Failed to build aestimo Installing collected packages: aestimo Running setup.py install for aestimo ... error Complete output from command c:\winpython\python-3.5.2.amd64\python.exe -u -c "import setuptools, tokenize;file='C:\Users\math ieu\AppData\Local\Temp\pip-install-3d1ke927\aestimo\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\ r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\mathieu\AppData\Local\Temp\pip-record-pr63yxd4\in stall-record.txt --single-version-externally-managed --compile: c:\winpython\python-3.5.2.amd64\lib\site-packages\Cython\Distutils\old_build_ext.py:30: UserWarning: Cython.Distutils.old_build_ext does not properly handle dependencies and is deprecated. "Cython.Distutils.old_build_ext does not properly handle dependencies " running install running build running build_py creating build creating build\lib.win-amd64-3.5 creating build\lib.win-amd64-3.5\aestimo copying aestimo.py -> build\lib.win-amd64-3.5\aestimo copying aestimo_dd_lib_setup.py -> build\lib.win-amd64-3.5\aestimo copying aestimo_eh.py -> build\lib.win-amd64-3.5\aestimo copying aestimo_poisson1d.py -> build\lib.win-amd64-3.5\aestimo copying config.py -> build\lib.win-amd64-3.5\aestimo copying database.py -> build\lib.win-amd64-3.5\aestimo copying database1.py -> build\lib.win-amd64-3.5\aestimo copying DDGelectron_driftdiffusion.py -> build\lib.win-amd64-3.5\aestimo copying DDGgummelmap.py -> build\lib.win-amd64-3.5\aestimo copying DDGhole_driftdiffusion.py -> build\lib.win-amd64-3.5\aestimo copying DDGnlpoisson.py -> build\lib.win-amd64-3.5\aestimo copying DDNnewtonmap.py -> build\lib.win-amd64-3.5\aestimo copying func_lib.py -> build\lib.win-amd64-3.5\aestimo copying intersubband_optical_transitions.py -> build\lib.win-amd64-3.5\aestimo copying main.py -> build\lib.win-amd64-3.5\aestimo copying main_iterating.py -> build\lib.win-amd64-3.5\aestimo copying profile.py -> build\lib.win-amd64-3.5\aestimo copying sample_double_qw.py -> build\lib.win-amd64-3.5\aestimo copying setup.py -> build\lib.win-amd64-3.5\aestimo copying setup_cython.py -> build\lib.win-amd64-3.5\aestimo copying VBHM.py -> build\lib.win-amd64-3.5\aestimo copying init.py -> build\lib.win-amd64-3.5\aestimo copying README.md -> build\lib.win-amd64-3.5\aestimo copying AUTHORS.md -> build\lib.win-amd64-3.5\aestimo copying COPYING.md -> build\lib.win-amd64-3.5\aestimo copying CHANGELOG.md -> build\lib.win-amd64-3.5\aestimo copying psi_at_inf_cython.pyx -> build\lib.win-amd64-3.5\aestimo copying psi_at_inf_cython.c -> build\lib.win-amd64-3.5\aestimo copying aestimo_dd_lib.pyx -> build\lib.win-amd64-3.5\aestimo copying aestimo_dd_lib.c -> build\lib.win-amd64-3.5\aestimo copying aestimo_dd_lib.pyd -> build\lib.win-amd64-3.5\aestimo creating build\lib.win-amd64-3.5\aestimo\tutorials copying tutorials\Aestimo_Tutorial.html -> build\lib.win-amd64-3.5\aestimo\tutorials copying tutorials\Aestimo_Tutorial.ipynb -> build\lib.win-amd64-3.5\aestimo\tutorials copying tutorials\Aestimo_tutorial2.html -> build\lib.win-amd64-3.5\aestimo\tutorials copying tutorials\Aestimo_tutorial2.ipynb -> build\lib.win-amd64-3.5\aestimo\tutorials copying tutorials\Aestimo_tutorial3.html -> build\lib.win-amd64-3.5\aestimo\tutorials copying tutorials\Aestimo_tutorial3.ipynb -> build\lib.win-amd64-3.5\aestimo\tutorials copying tutorials\Aestimo_tutorial4.html -> build\lib.win-amd64-3.5\aestimo\tutorials copying tutorials\Aestimo_tutorial4.ipynb -> build\lib.win-amd64-3.5\aestimo\tutorials creating build\lib.win-amd64-3.5\aestimo\examples copying examples\samples.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_1qw_barrierdope_ingaas.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_2qw_barrierdope_ingaas.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_2qw_InGaAS_GaAs.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_2qw_InGaN_GaN_vs_1ddcc.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_double_qw.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_double_qw_isbt.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_moddop.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_mqw_barrierdope_p_ingan.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_mqw_barrierdope_p_ingan_2.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_multi_qw_barrierdope_p.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_multi_qw_barrierdope_p2.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_multi_qw_barrierdope_p_ingan.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_pn.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_pn2.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_pn3.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope_ingaas.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope_ingan.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope_ingan_2.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope_p.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope_p_AlGaInN.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope_p_AlGaInN_2.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope_p_algan_gan_heterojunction.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope_p_cdzno.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope_p_ingaas.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_barrierdope_p_InGaAsP.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_HarrisonCh3_3.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_HarrisonCh3_5.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_periodic_potential.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_qwdope.py -> build\lib.win-amd64-3.5\aestimo\examples copying examples\sample_qw_wide_isbt.py -> build\lib.win-amd64-3.5\aestimo\examples running build_ext skipping 'psi_at_inf_cython.c' Cython extension (up-to-date) building 'aestimo.psi_at_inf_cython' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/vis ual-cpp-build-tools
Command "c:\winpython\python-3.5.2.amd64\python.exe -u -c "import setuptools, tokenize;file='C:\Users\mathieu\AppData\Local\Tem p\pip-install-3d1ke927\aestimo\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();ex ec(compile(code, file, 'exec'))" install --record C:\Users\mathieu\AppData\Local\Temp\pip-record-pr63yxd4\install-record.txt --singl e-version-externally-managed --compile" failed with error code 1 in C:\Users\mathieu\AppData\Local\Temp\pip-install-3d1ke927\aestimo\ You are using pip version 10.0.1, however version 20.3b1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\WinPython\scripts>