ros-industrial / easy_perception_deployment

A ROS2 package that accelerates the training and deployment of CV models for industries.
Apache License 2.0
53 stars 16 forks source link

RuntimeError: module compiled against API version 0xc but this version of numpy is 0xa #22

Closed Srikiranrao closed 3 years ago

Srikiranrao commented 3 years ago

Hi @cardboardcode While training for new data we faced the following issue: image

The current numpy version in p3_exporter conda env is 1.20.3. May I know how to solve this issue.

cardboardcode commented 3 years ago

Hi @Srikiranrao, this error is caused by the wrong numpy version used. I can address this in a hot fix.

For now, please ensure your numpy version is 1.19.2. To do so, you can try the following commands:

conda activate p3_exporter
pip install numpy==1.19.2

Then run the training sequence again from EPD GUI.

Srikiranrao commented 3 years ago

@cardboardcode Downgraded the conda environment image

But still the same issue.

image

cardboardcode commented 3 years ago

Try uninstall numpy and installing again. I am referencing this solution.

conda activate p3_exporter
pip uninstall numpy
pip install numpy==1.19.3

Please ensure that the new numpy installation reflects that 1.19.3. There are times where this error is due to the wrong PythonPath set on a workstation.

pip freeze | grep numpy
cardboardcode commented 3 years ago

If that still does not work, then you can try this:

Add the following line above line 27 of the file easy_perception_deployment/easy_perception_deployment/gui/trainer/exporter_files/scripts/install_p3exporter.bash. Click here for the file.

pip3 install numpy==1.19.2

Then remove the p3_exporter conda environment you currently have with this command:

conda env remove --name p3_exporter

Then run your training sequence again.

cardboardcode commented 3 years ago

Verified that this error is reproducible with the latest version of easy_perception_deployment.

Will work on a hot fix and do a patch shortly.

Verified that the above solution works in rectifying the issue.

Try uninstall numpy and installing again. I am referencing this solution.

conda activate p3_exporter
pip uninstall numpy
pip install numpy==1.19.3

Please ensure that the new numpy installation reflects that 1.19.3. There are times where this error is due to the wrong PythonPath set on a workstation.

pip freeze | grep numpy
cardboardcode commented 3 years ago

@Srikiranrao Feel free to reopen this issue if you are still facing this same issue.

Closing.

Srikiranrao commented 3 years ago

@cardboardcode Thanks, the issue was resolved.