JRCSTU / CO2MPAS-TA

EU's Type-Approving vehicle simulator predicting NEDC CO2 emissions from WLTP
https://co2mpas.readthedocs.io/
European Union Public License 1.1
25 stars 13 forks source link

Error `pip.operations import freeze` when running co2mpas simulator #26

Closed mitrapo closed 6 years ago

mitrapo commented 6 years ago

Hi, We run CO2MPAS for one input file on two computers, and on one of them we get the following error, where as the other one runs without any problem. Do you have any idea where the problem can come from? We have checked the python, pip and co2mpas paths and they all seems fine.

2018-05-24 10:16:59,475:co2mpas:INFO:Launched CO2MPAS job: 2018-05-24 10:17:02,189:co2mpas:INFO:Job CO2MPAS 1 of 1: 'C:/COMPAS/CO2MPAS_flow/outputs/XUP1041.xlsx'... 2018-05-24 10:18:05,591:co2mpas.model.selector:INFO: Engine cold start speed model selector warning: Models {'cold_start_speed_model'} to predict [none, 'wltp_h', 'nedc_h'] failed the calibration. 2018-05-24 10:18:05,591:co2mpas.model.selector:INFO: Engine cold start speed model selector warning: Models {'cold_start_speed_model'} to predict ['wltp_l', 'nedc_l'] failed the calibration. 2018-05-24 10:18:06,340:co2mpas.model.selector:INFO: Engine coolant temperature model selector warning: Models {'max_engine_coolant_temperature', 'engine_temperature_regression_model'} to predict [none, 'wltp_h', 'nedc_h'] failed the calibration. *2018-05-24 10:18:06,340:co2mpas.model.selector:INFO: Engine coolant temperature model selector warning: Models {'max_engine_coolant_temperature', 'engine_temperature_regression_model'} to predict ['wltp_l', 'nedc_l'] failed the calibration. 2018-05-24 10:18:12,674:schedula.utils.sol:ERROR:Failed DISPATCHING 'convert2df' due to: ModuleNotFoundError("No module named 'pip.operations'",) Traceback (most recent call last): File "c:\users\hstenva1\downloads\co2mpas_aio-1.7.3\apps\winpython\python-3.6.1.amd64\lib\site-packages\schedula\utils\sol.py", line 747, in _set_function_node_output res = self._evaluate_function(args, node_id, node_attr, attr) File "c:\users\hstenva1\downloads\co2mpas_aio-1.7.3\apps\winpython\python-3.6.1.amd64\lib\site-packages\schedula\utils\sol.py", line 533, in _evaluate_function res = fun(args) File "c:\users\hstenva1\downloads\co2mpas_aio-1.7.3\apps\winpython\python-3.6.1.amd64\lib\site-packages\co2mpas\io__init__.py", line 78, in convert2df res.update(_proc_info2df(report, start_time, main_flags)) File "c:\users\hstenva1\downloads\co2mpas_aio-1.7.3\apps\winpython\python-3.6.1.amd64\lib\site-packages\co2mpas\io__init.py", line 137, in _proc_info2df res = (_co2mpas_info2df(start_time, main_flags), _freeze2df()) File "c:\users\hstenva1\downloads\co2mpas_aio-1.7.3\apps\winpython\python-3.6.1.amd64\lib\site-packages\co2mpas\io\init__.py", line 170, in _freeze2df from pip.operations import freeze ModuleNotFoundError: No module named 'pip.operations'** 2018-05-24 10:18:12,955:co2mpas.batch:INFO:Written into xl-file(C:\Users\HSTENVA1\Downloads\co2mpas_AIO-1.7.3\CO2MPAS\20180524_101659-summary.xlsx)... 2018-05-24 10:18:12,955:co2mpas.batch:INFO:Done! [73.479884 sec] 2018-05-24 10:18:12,970:co2mpas:INFO:Finished job CO2MPAS.

dimitriskomnos commented 6 years ago

Dear @mitrapo,

Can you, please, ensure that CO2MPAS has been installed correctly in the computer that the error appears? The correct way to install is explained here

In addition, please give us the output of the command: co2mpas -Vv to see if there is a problem with the paths.

We look forward to your reply. Thank you!

ankostis commented 6 years ago

Dear @mitrapo, the error you see regarding No module named 'pip operations' happens when co2mpas tries to imprint in the output-file the exact library-versions with which its results were calculated.
It is not a fatal error, and your run must still produce correct outputs, correct?

The cause of the error seems to be a more recent version of pip installed; Co2mpas is not yet compatible with pip-v10.x.y+ versions. We would be very interesting to know the way this happened:

Note that changing certain python libraries has an influence to the bit-to-bit reproducability of the results (and that is the reason behind the pip freeze` operation above).

In any case, sooner than later, alpha or beta versions regarding the next release of co2mpas will start to appear - you are always welcome, should you wish to participate to beta testing them.

mitrapo commented 6 years ago

Thanks a lot for your quick response. In facet the problem was actually the pip version. i had the 10.0.1 version (at some point i installed it seperatley), so as you said i changed it to 9.0.1 and COMPAS works without a problem again. Thanks again! Mitra