How to install win32com module in a virtualenv?

后端 未结 3 830
被撕碎了的回忆
被撕碎了的回忆 2020-12-29 07:27

I have installed both virtualenv and pywin32 on my Windows 7 64-bit laptop, and each of them seems to work, but not with each other.

More s

3条回答
  •  自闭症患者
    2020-12-29 07:38

    UPDATE 2016

    There is now a version of pywin32 on PyPI that can be installed with pip. It is called pypiwin32, and it installs the package using the binary wheel format.

    https://pypi.python.org/pypi/pypiwin32

    pip install pypiwin32
    

    That will work in a virtualenv, or with tox, etc.


    Below this line is my previous old answer. That is now outdated information.

    OLD ANSWER - OUTDATED. Modern versions of virtualenv default to --no-site-packages. That means that not having access to global site-packages is now the default behavior. Sadly, (as of July 2014) you can not pip install pywin32 in to your virtualenv. (here's the bug report) If you want to get pywin32 running inside a virtualenv, activate the virtualenv and use easy_install and the pywin32 installer exe file. For example easy_install "C:\Path\To\Downloads\pywin32-219.win32-py3.4.exe"

    Related question

提交回复
热议问题