Can't get pywin32-219 to work with python 3.5 - python

It seems to install without error using the EXE (in my case pywin32-219.win-amd64-py3.5.exe) however when run the python interpreter and try to "import win32api" I get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.
If I download the zip file and try to run "setup3.py install" I get the following output:
Converting...
Executing...
Building pywin32 3.5.219.0
Traceback (most recent call last):
File "setup3.py", line 16, in <module>
exec(str(got))
File "<string>", line 1929, in <module>
File "<string>", line 587, in __init__
File "C:\Python35\lib\ntpath.py", line 113, in join
genericpath._check_arg_types('join', path, *paths)
File "C:\Python35\lib\genericpath.py", line 143, in _check_arg_types
(funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'NoneType'
I've tried a couple of things but cant get it to work.
Has anyone gotten pywin32 to install and work correctly with python 3.5?

You need to run the pywin installer with elevated permissions as it writes to the system32 folder. If you didn't run with elevated permissions, open an admin cmd prompt and run the postinstall script in the pywin install directory.

The compiling from source error is related to pywin32 not catching an error that ends up crashing everything. Specifically line 587 of setup.py causes a crash if sdk_dir is None.
Changing line 587 to
if sdk_dir and os.path.isfile(os.path.join(sdk_dir, "include", "activdbg.h")):
prevents that crash, but my installation later crashes with the following error:
win32/src/win32wnet/PyNetresource.cpp(120): error C2440: 'initializing':
cannot convert from 'int (__cdecl *)(PyObject *,PyObject *)' to 'PyAsyncMethods *'win32/src/win32wnet/PyNetresource.cpp(120): note: There is no context in which this conversion is possible
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2

Related

TypeError: __init__() missing 1 required positional argument: 'msg' everytime i try to download anaconda3 on macbook

I am trying to download anaconda3 terminal version for a 64bit mac OS Catalina to use for python 3.7, and i keep running into the error:
Unpacking payload ...
concurrent.futures.process._RemoteTraceback:
'''
Traceback (most recent call last):
File "concurrent/futures/process.py", line 368, in _queue_management_worker
File "multiprocessing/connection.py", line 251, in recv
TypeError: __init__() missing 1 required positional argument: 'msg'
'''
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "entry_point.py", line 69, in <module>
File "concurrent/futures/process.py", line 484, in _chain_from_iterable_of_lists
File "concurrent/futures/_base.py", line 611, in result_iterator
File "concurrent/futures/_base.py", line 439, in result
File "concurrent/futures/_base.py", line 388, in __get_result
concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.
[16126] Failed to execute script entry_point
all i am trying to do is install anaconda3 on my laptop to use for a sentiment analysis program that only runs on python 3.7 (otherwise i would use google colab). this is my first time trying to run python on terminal, and it has been such a headache.
i have no idea what is going wrong. i cannot access jupyter notebook without anaconda, and anaconda refuses to install correctly. any help would be greatly appreciated, this is driving me nuts.
are there any better apps through which i can use python 3.7 without having to go through this pain??? extremely frustrating.
It seems that you are running out of space
I met the question on x86, when I use sudo sh Anaconda.sh, it runs well.
But when I just use sh Anaconda.sh, it returns this problem.
Why dont use sudo sh Anaconda.sh for me? Because after install Anaconda, when you need install packages, it warns that you need sudo conda xxx, it's so inconvinient.
You can try sudo to install Anaconda to see if we have the same problem.

pywin32 RuntimeError: Can't find the Windows SDK

Execute "python setup3.py install" reported this error
I am searching for a long time on net. But no use. Please help or try to give some ideas how to achieve this.
D:\Software Package\pywin32-master\pywin32-master>python setup3.py install
Converting...
Executing...
Building pywin32 3.6.221.0
Traceback (most recent call last):
File "setup3.py", line 16, in <module>
exec(str(got))
File "<string>", line 305, in <module>
RuntimeError: Can't find the Windows SDK
D:\Software Package\pywin32-master\pywin32-master>python setup.py install
File "setup.py", line 127
print "Building pywin32", pywin32_version
^
SyntaxError: Missing parentheses in call to 'print'

matplotlib issues installing on windows

I'm trying to install matplotlib on windows using easy-install and also I tried pip, but I'm getting the error below, how can I fix this
error: Setup script exited with error: Could not initialize compiler instance: do you have Visual Studio installed? If you are trying to build with mingw, please use python setup.py
build -c mingw32 instead. If you have Visual Studio installed, check it is
correctly installed, and the right version (VS 2008 for python 2.6, VS 2003 for
2.5, etc...). Original exception was: Unable to find vcvarsall.bat, and the Compiler class was MSVCCompiler
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "C:\Python26\lib\atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "C:\Python26\lib\multiprocessing\util.py", line 270, in _exit_function
info('process shutting down')
TypeError: 'NoneType' object is not callable
Error in sys.exitfunc:
Traceback (most recent call last):
File "C:\Python26\lib\atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "C:\Python26\lib\multiprocessing\util.py", line 270, in _exit_function
info('process shutting down')
TypeError: 'NoneType' object is not callable
C:\Python26\Scripts>
Compiling C extensions on Windows requires VisualStudio Express in the most cases and will be far from easy. Instead you can download the binary package for your Python version to a local directory and install with easy_install like so:
easy_install "C:\path_to_local_binary_dir\matplotlib-1.3.1-win-xxx.exe"
(replace with full path/filename). This will not show up in Add/Remove programs and also works for virtual envs.

Installing PYMC on Win64 - but MinGW does not seem to compile

I'm trying to install PYMC on a Win7-64 machine, using Python 2.7.3, installed as part of Python(x, y).
I've attempted to use python setup.py install, but that didn't work. I then went down the route of installing MinGW and MSYS as per these instructions http://pymc-devs.github.io/pymc/INSTALL.html, but I still have the error message below. I have added the details to my path.
I have also tried using the MCMC linked to via https://groups.google.com/forum/#!searchin/pymc/install$20windows/pymc/_10AZdgd620/wFPh4qium8QJ and the additional compiler details listed here https://groups.google.com/forum/#!topic/pymc/1-ENfS5NBQE and here http://ultrainfinitum.blogspot.co.uk/2012/12/python-error-unable-to-find-vcvarsallbat.html, which state to use the following compiler commands, setup.py install build --compiler=mingw32 or python setup.py build --force -c mingw32, then python setup.py install --force --skip-build.
The error message I'm getting is as follows:
error: Setup script exited with error: Unable to find vcvarsall.bat
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "c:\Python27\lib\atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "c:\Python27\lib\multiprocessing\util.py", line 284, in _exit_function
info('process shutting down')
TypeError: 'NoneType' object is not callable
Error in sys.exitfunc:
Traceback (most recent call last):
File "c:\Python27\lib\atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "c:\Python27\lib\multiprocessing\util.py", line 284, in _exit_function
info('process shutting down')
TypeError: 'NoneType' object is not callable
Any ideas on what to try next?
Quick Solution (with Visual Studio Express)
Install Visual Studio Express. This will give you all the vcvarsall.* dependencies.
Using MinGW
Make sure to select the C, C++ and other dev tools to ensure you get make.exe.
After this, set your PATH to include MinGW32's bin directory as well as msys\1.0\bin
Edit the distutils.cfg file located at C:\Python26\Lib\distutils\distutils.cfg to set your compiler options.
[build]
compiler=mingw32

problem running scons

I am trying to get started with scons. I have Python 3.0.1 and downloaded Scons 1.2.0; when I try to run scons I get the following error. Am I doing something wrong here?
C:\tmp\scons>c:\appl\python\3.0.1\Scripts\scons
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\appl\python\3.0.1\Lib\site-packages\scons-1.2.0\SCons\__init__.py", l
ine 43, in <module>
import SCons.compat
File "c:\appl\python\3.0.1\Lib\site-packages\scons-1.2.0\SCons\compat\__init__
.py", line 208
raise Error, "Cannot move a directory '%s' into itself '%s'." % (src, dst)
^
SyntaxError: invalid syntax
That's Python 2 syntax. I assume scons doesn't run on Python 3. You need to run it using Python 2.

Categories