Adafruit FT232H: libftdi1 with 64 bit Python 3.6 on Windows

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
EveryColorYouAre
 
Posts: 2
Joined: Wed May 16, 2018 2:22 pm

Adafruit FT232H: libftdi1 with 64 bit Python 3.6 on Windows

Post by EveryColorYouAre »

Has anyone managed to get the libFTDI library (https://www.intra2net.com/en/developer/libftdi/) working with 64 bit Python 3.6 on Windows?

Using the files at (https://github.com/atelier-ritz/Python3 ... libftdi1.4) I can import the library properly into 32 bit Python 3.6. (NOTE: The .dll files and the .pyd/py files are not longer visible, so you have to go back through the change history and find the files). This repository has an updated FT232H.py file that you use to replace the similarly named file in the Adafruit_GPIO Python library to get it to work with Python 3.6.

I can also get it working with 64 bit Python 3.3 using the files at (https://sourceforge.net/projects/picusb/files/) using the libftdi1-1.1_devkit_x86_x64_21Feb2014.zip build. However, the 64 bit libraries do not work with 64 bit Python 3.6 and you get a "ImportError: DLL load failed: The specified module could not be found" error.

I have tried building libftdi version 1.4 as per the instructions on (https://github.com/atelier-ritz/Python3 ... libftdi1.4) but the directions are super vague and I am not able to use CMake to build the library. After much modifications and manually adding paths I was able to get the make to succeed, but no files where outputed. I also don't know what to modify to get the output to generate 64 bit DLLs and PYD. All the information I have is based on the information in this thread (https://sourceforge.net/p/mingw-w64/mai ... /30509426/) where a -DMS_WIN64 flag needs to be passed to some part of the make chain.

Has anyone attempted, or would like to attempt, to build a 64 bit version of libftdi version 1.4 for 64 bit Python 3.6?

Any help would be hugely appreciated.

-Bob

User avatar
blahfacepants
 
Posts: 3
Joined: Thu Jun 18, 2015 2:22 pm

Re: Adafruit FT232H: libftdi1 with 64 bit Python 3.6 on Wind

Post by blahfacepants »

Bob-

How did you manage to install libftdi onto 64 bit python 3.3? Python just crashes every time I import ftdi1. What files did you copy over to site-packages?

-Archan

User avatar
EveryColorYouAre
 
Posts: 2
Joined: Wed May 16, 2018 2:22 pm

Re: Adafruit FT232H: libftdi1 with 64 bit Python 3.6 on Wind

Post by EveryColorYouAre »

Update:

Xiaofan was kind enough to compile the libftdi binaries for Windows using the Python 3.6 64 bit bindings, so you can can now import ftdi1 without errors. The new binaries are located at https://sourceforge.net/projects/picusb ... rce=navbar. You need to copy the DLLs located in the "bin64" folder into the site-packages folder of the Python installation. Additionally, also copy "_ftdi1.pyd" and "ftdi1.py" in "bin64/Python3.6/Lib/site_packages" into the Python site-packages folder.

To get Adafruit_GPIO working with Python 3.6 (32 or 64 bit), you need to replace the FT232H.py file in the Adafruit_GPIO python install folder with the updated file located at https://github.com/atelier-ritz/Python3 ... libftdi1.4. Obviously do this replacement before you install the package by running the setup.py script with "python.exe setup.py install".

I would suggest to Adafruit to update their setup guide for the FT232H breakout board to include these updates as this was a pain in the butt to get everything working.

User avatar
blahfacepants
 
Posts: 3
Joined: Thu Jun 18, 2015 2:22 pm

Re: Adafruit FT232H: libftdi1 with 64 bit Python 3.6 on Wind

Post by blahfacepants »

I saw the binaries on his website. Thanks for the help, but I ended up just using 32-bit Python 2.7. It wasn't worth my time in this particular use case to worry over Python versions.

-Archan

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”