Reputation: 11
I'd like to install pyfmi but it kept failed.. I tried solutions on internet before, but nothing works.. would you give me solutions please??
(base) C:\Users\user>pip install pyfmi Collecting pyfmi Using cached PyFMI-2.5.tar.gz (4.8 MB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [6 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "C:\Users\user\AppData\Local\Temp\pip-install-l6733u74\pyfmi_8a142165ae444bbdb9d65b923602318f\setup.py", line 164, in raise Exception("FMI Library cannot be found. Please specify its location, either using the flag to the setup script '--fmil-home' or specify it using the environment variable FMIL_HOME.") Exception: FMI Library cannot be found. Please specify its location, either using the flag to the setup script '--fmil-home' or specify it using the environment variable FMIL_HOME. [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.
I tried PIP install
Upvotes: 1
Views: 405
Reputation: 1
I had the same issue and all I can say is that I strongly advise you to not waste your time like I did trying to install every requirement by hand.
Use conda instead.
all you need to do is this:
First, Install anaconda :
For windows (I did it on Git Bash):
https://www.anaconda.com/download
https://discuss.codecademy.com/t/setting-up-conda-in-git-bash/534473
Once that's installed on your prompt:
Creating the conda env:
conda create -n your_name_goes_here
conda activate your_name_goes_here
conda install python=3.6
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install pyfmi
(thanks to conda forge https://github.com/conda-forge/pyfmi-feedstock)
if you're using visual studio code like me and want your packages to be recognized:
~/anaconda3/envs/your_environment_name/bin/python.exe
Note: you will have to reinstall some packages you are using in your code. If you want to install any other package just insert conda install PACKAGE_NAME
, but I should mention that I Faced some issues with some libraries while installing such as matplotlib but fixes are always available if you search well! https://github.com/ContinuumIO/anaconda-issues/issues/10949
I hope this works for you !
Upvotes: 0