Tpot: Pywin32 requested for Anaconda distribution

Created on 3 Apr 2019  路  6Comments  路  Source: EpistasisLab/tpot

I've installed tpot as suggested from the documentation. I skipped the pywin32 installation since I'm using an Anaconda environment (on Windows). But when I try

import tpot

it raises the error

ModuleNotFoundError: No module named 'win32api'

I manage to fix the error by installing pywin32 as suggested for the non-Anaconda users.

being worked on question

All 6 comments

pywin32 should in default packages on Anaconda environment on Windows (see this list). If not you may try pip install pywin32 or conda install pywin32. Please let me know if this will solve the issue.

Just wanted to let you know my conda environment also did not come with pywin32. After installing it all works well.

Me too

OK, we will refine installation guide for this issue.

I'm not using anaconda, so to solve this issue I needed to:

  1. pip install pywin32
  2. pip install pypiwin32
  3. Follow the instructions from the following post: https://github.com/michaelgundlach/pyspeech/issues/23#issuecomment-280915608

I have the same problem for days, but one day I solved it.
After you installed the pywin32 libs, there is a directory "Lib/site-packages/pywin32_system32", which including three dll libs, copy them to the "/Lib/site-packages/win32" directory, which including the win32api.pyd or win32api.pyc.
There will be no ImportError Exception any more

Then no more errors :)

The issue has been fixed in a new version of TPOT (v0.11.0) because pywin32 package is not needed any more. Please feel free to reopen it if you have any questions or suggestions.

Was this page helpful?
0 / 5 - 0 ratings