Conda package conflicts while exporting Tensorflow trained model into ONNX

I used these instructions to build up a conda env and train tensorflow model:

conda create --name tf210 python=3.8
conda activate tf210
conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0
pip install tensorflow-gpu==2.10.0 keras==2.10.0 
pip install opencv-python==4.4.0.44 pillow==8.2 numpy==1.22 matplotlib scipy pandas scikit-learn tqdm imutils PyYAML tensorboard seaborn protobuf==3.20 chardet

pip install tensorflow-datasets==4.6.0
conda install ipykernel
python -m ipykernel install --user --name=tf210 --display-name="tf210"

conda install -c conda-forge widgetsnbextension ipywidgets

The env worked well and I trained my MNIST model, but when I try to install the package below, my code reported errors. I wonder how can I fix this problem and export my tensorflow model directly into ONNX model.

pip install tf2onnx
pip install onnxruntime

Here is the error log:

Traceback (most recent call last):
  File "F:pythonProjectmain.py", line 3, in <module>
    import tensorflow_datasets as tfds
  File "D:Anacondaenvstf210libsite-packagestensorflow_datasets__init__.py", line 52, in <module>
    from tensorflow_datasets import image
  File "D:Anacondaenvstf210libsite-packagestensorflow_datasetsimage__init__.py", line 43, in <module>
    from tensorflow_datasets.image.dsprites import Dsprites
  File "D:Anacondaenvstf210libsite-packagestensorflow_datasetsimagedsprites.py", line 23, in <module>
    import h5py
  File "D:Anacondaenvstf210libsite-packagesh5py__init__.py", line 26, in <module>
    from . import _errors
ImportError: DLL load failed while importing _errors:The specified program cannot be found.

I searched the Internet and tried to find out which package is in conflict, but I failed. It seems that all the packages in my conda list are correct except the protobuf 3.20.3, but there is an answer in Stackoverflow that shows protobuf 3.20.x is the only suitable version for tensorflow-gpu 2.10.0 and tensorboard 2.14.0.

I wonder if I can still use tensorflow-gpu 2.10.0 and exported my tensorflow model into ONNX model, yet I haven’t figure out where the conflict is. I would be appreciated if anyone answers my question. Tell me if there is more details and information needed.

New contributor

Me262-Stormbird is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật