Python Forum
Has anyone figured out how to get pywin32 into a virtual environment yet?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Has anyone figured out how to get pywin32 into a virtual environment yet?
#3
(Jun-01-2020, 08:45 PM)Larz60+ Wrote: People have been trying for years to get pywin32 to work inside a virtual environment, and it seems nobody has succeeded yet.
Then i most have been lucky as done this a lot of times Wink
Here a run.
# Make
C:\Python38
λ python -m venv py32_env

# cd in
C:\Python38
λ cd py32_env\

# Activate
C:\Python38\py32_env
λ C:\Python38\py32_env\Scripts\activate

# Test pip
C:\Python38\py32_env
(py32_env) λ pip -V
pip 19.2.3 from c:\python38\py32_env\lib\site-packages\pip (python 3.8)

# Install
C:\Python38\py32_env
(py32_env) λ pip install pywin32
Collecting pywin32
  Downloading .....
Successfully installed pywin32-227

# Test that it work
C:\Python38\py32_env
(py32_env) λ python
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import win32com.client as win32
>>>
>>> win32.pythoncom
<module 'pythoncom' (C:\Python38\py32_env\lib\site-packages\pywin32_system32\pythoncom38.dll)>
>>>
>>> exit()
Reply


Messages In This Thread
RE: Has anyone figured out how to get pywin32 into a virtual environment yet? - by snippsat - Jun-01-2020, 09:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with creating folder and "virtual environment" AudunNilsen 1 298 Mar-21-2024, 04:41 AM
Last Post: deanhystad
  Installing python packages in a virtual environment Led_Zeppelin 1 833 Aug-15-2023, 08:18 PM
Last Post: deanhystad
  Problem with virtual environment standenman 2 1,055 Feb-23-2023, 07:09 PM
Last Post: standenman
Question Virtual Environment (using VS Code) Ashcora 4 15,937 Feb-15-2023, 07:17 PM
Last Post: snippsat
  How to find PyWin32 for Python 2.1.3 Paul_Newton 9 1,842 Nov-20-2022, 09:15 PM
Last Post: Paul_Newton
  pywin32: Outlook connection ends with 'operation aborted' on one machine tstone 0 2,482 May-03-2022, 04:29 AM
Last Post: tstone
  pywin32 problems catlessness 0 1,292 Apr-01-2022, 01:04 PM
Last Post: catlessness
  How do I link the virtual environment of that project to the 3.9.2 version of python? Bryant11 1 1,428 Feb-26-2022, 11:15 AM
Last Post: Larz60+
  Project structure with a virtual environment gdbengo 1 1,497 Jan-26-2022, 03:22 PM
Last Post: snippsat
  pywin32 Illustrator Throwing Exception Error matthewsjc1 7 5,785 Aug-27-2021, 02:43 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020