0

I am trying to install pywin32 behind a proxy, and therefore I had to use the zip, rather than the .exe file available. I have down this with other packages and they work fine.

PS C:\Users\Michael.Spencer\Downloads\pywin32-221\pywin32-221> py -3 setup3.py build
Converting...
Executing...
Building pywin32 3.6.221.0
Traceback (most recent call last):
File "setup3.py", line 16
    exec(str(got))
File "<string>", line 1944, in <module>
File "<string>", line 594, in __init__

File "C:\Program Files\Python36\lib\ntpath.py", line 75, in join
   path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType

I have never come across this issue when downloading packages manually. The only issue I can think of is my machine is 64 bit, and maybe the zip file only contains a 32 bit version? However from what I've read, that would result in a different errortype. Any help is appreciated thanks.

Mwspencer
  • 1,142
  • 3
  • 18
  • 35
  • If you want to install it, why not try `pip install pypiwin32` https://pypi.python.org/pypi/pypiwin32 , also it would depend on the version of python you have installed i.e for 32 bit python installation, the 32 bit version of pywin32 – wolfsgang May 30 '17 at 16:51
  • I am trying to install on my work computer, where I don't have admin rights to save to Program Files, which is my python36 folder is located. Is there a way to tell pip where to save the package so that I can choose a folder I do have rights to? – Mwspencer May 30 '17 at 17:22
  • why not create a virtualenv or is that not possible? – wolfsgang May 30 '17 at 17:25
  • That's an interesting idea, but I have not been able to find a zip version, which is the only way I know of to install packages behind a proxy. – Mwspencer May 30 '17 at 17:43
  • 1
    You should really use virtualenv and you can always build from source ,https://pypi.python.org/pypi/virtualenv/1.8.2, though that comes with its own problems. Use can save elsewhere with pip too, https://stackoverflow.com/questions/2915471/install-a-python-package-into-a-different-directory-using-pip – wolfsgang May 30 '17 at 17:53
  • @wolfsgang I'll give the virtualenv a try because it sounds like a good permanent solutions, but as a temporary solution the link you provided suggesting pip install --target=[path] worked, thanks! – Mwspencer May 30 '17 at 20:36

1 Answers1

1

An alternate simpler way to install, just re-iterating from the comments, is instead of building from source would be,

pip install pypiwin32

and to install in a different directory, for whatever reason,

pip install --target=[path] pypiwin32 from

Install a Python package into a different directory using pip?

wolfsgang
  • 884
  • 6
  • 12