llSourcell / How_to_simulate_a_self_driving_car

This is the code for "How to Simulate a Self-Driving Car" by Siraj Raval on Youtube
431 stars 305 forks source link

Issue with importing OpenCV (ImportError: /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0: undefined symbol: FT_Get_Var_Blend_Coordinates) #40

Open Stormwaker opened 5 years ago

Stormwaker commented 5 years ago

I'm getting following issue while running model: import cv2,os The error showing is: ImportError: /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0: undefined symbol: FT_Get_Var_Blend_Coordinates

Steps taken leading to issue:

  1. Installed Ubuntu 18.10
  2. Installed Anaconda
  3. Run "git clone https://github.com/llSourcell/How_to_simulate_a_self_driving_car.git" in terminal.
  4. Downloaded Udacity Self-Driving Car Simulator (binary version 1).
  5. Run "conda env create -f environments.yml" inside cloned folder.
  6. Run "conda activate car-behavioral-cloning"
  7. Opened Udacity Self-Driving Car Simulator into autonomous mode.
  8. Run "python drive.py model.h5"

After step 8 I've run into issued mentioned above. I've seen 2 similar issues (#32, #35) on this repo, but both were closed by the authors without any explanation about how to fix this issue or what is the cause of it.

Issue can be easily reproduced inside virtual machine with any recent Ubuntu build.

Stormwaker commented 5 years ago

You can bypass this issue by switching few libraries versions inside conda enviroment:

Might work with some other (newer) versions, but this is what I've found to work.

fouadBEN commented 5 years ago

It is a problem with libharbuzz versioning as @Stormwaker mentioned above. Try this https://askubuntu.com/questions/1130349/importerror-usr-lib-x86-64-linux-gnu-libharfbuzz-so-0-undefined-symbol-ft-ge

Stormwaker commented 5 years ago

It is a problem with libharbuzz versioning as @Stormwaker mentioned above. Try this https://askubuntu.com/questions/1130349/importerror-usr-lib-x86-64-linux-gnu-libharfbuzz-so-0-undefined-symbol-ft-ge

Yeah, I'm the author of that post and the reply xd Just leaving it here If someone had same issue.

HXB-1997 commented 11 months ago

不用这么麻烦,pip卸载opencv-python,再pip重装3.*版本opencv就行。我跟你一样的问题,亲测解决