Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WinError 193] %1 is not a valid Win32 application when installing discord.py[voice] #1444

Closed
PickleJr opened this issue Jul 22, 2018 · 7 comments

Comments

@PickleJr
Copy link

Below is the code I get when I try to run the python3 -m pip install -U discord.py[voice] voice command :/ . I am running this on windows 10, with python 3.7.

Running setup.py install for PyNaCl ... error
    Complete output from command c:\python37\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Taylor\\AppData\\Local\\Temp\\pip-install-2r6c13hz\\PyNaCl\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Taylor\AppData\Local\Temp\pip-record-vukv8v29\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    creating build\lib.win-amd64-3.7\nacl
    copying src\nacl\encoding.py -> build\lib.win-amd64-3.7\nacl
    copying src\nacl\exceptions.py -> build\lib.win-amd64-3.7\nacl
    copying src\nacl\hash.py -> build\lib.win-amd64-3.7\nacl
    copying src\nacl\public.py -> build\lib.win-amd64-3.7\nacl
    copying src\nacl\secret.py -> build\lib.win-amd64-3.7\nacl
    copying src\nacl\signing.py -> build\lib.win-amd64-3.7\nacl
    copying src\nacl\utils.py -> build\lib.win-amd64-3.7\nacl
    copying src\nacl\__init__.py -> build\lib.win-amd64-3.7\nacl
    creating build\lib.win-amd64-3.7\nacl\bindings
    copying src\nacl\bindings\crypto_box.py -> build\lib.win-amd64-3.7\nacl\bindings
    copying src\nacl\bindings\crypto_hash.py -> build\lib.win-amd64-3.7\nacl\bindings
    copying src\nacl\bindings\crypto_scalarmult.py -> build\lib.win-amd64-3.7\nacl\bindings
    copying src\nacl\bindings\crypto_secretbox.py -> build\lib.win-amd64-3.7\nacl\bindings
    copying src\nacl\bindings\crypto_sign.py -> build\lib.win-amd64-3.7\nacl\bindings
    copying src\nacl\bindings\randombytes.py -> build\lib.win-amd64-3.7\nacl\bindings
    copying src\nacl\bindings\sodium_core.py -> build\lib.win-amd64-3.7\nacl\bindings
    copying src\nacl\bindings\__init__.py -> build\lib.win-amd64-3.7\nacl\bindings
    running build_clib
    error: [WinError 193] %1 is not a valid Win32 application

    ----------------------------------------
  Rolling back uninstall of pynacl
Command "c:\python37\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Taylor\\AppData\\Local\\Temp\\pip-install-2r6c13hz\\PyNaCl\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Taylor\AppData\Local\Temp\pip-record-vukv8v29\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Taylor\AppData\Local\Temp\pip-install-2r6c13hz\PyNaCl\
@Harmon758
Copy link
Contributor

Harmon758 commented Jul 22, 2018

The current version on PyPI does not support Python 3.7. See #1249 and #1401.
However, the rewrite branch now supports 3.7 with all its dependencies, since 34ece4d including voice, with 134bc21.
The exception is PyNaCl, for which you'll probably still encounter this error with when installing with voice support on 3.7.
This error is due to PyNaCl not having a 3.7 wheel for the locked version 1.1.2:

'voice': ['PyNaCl==1.1.2'],

I recommend installing the rewrite branch of discord.py[voice] without dependencies and installing the dependencies manually, so that you can install PyNaCl 1.2.1 with the 3.7 wheel on PyPI.
Alternatively, installing the rewrite branch without voice and then installing PyNaCl 1.2.1 should work as well.

@PickleJr
Copy link
Author

Thanks! For clarification, just to be sure, the dependencies are
aiohttp, websockets, and PyNaCl? If so then it appears everything is fixed!

@Harmon758
Copy link
Contributor

Yes, for discord.py[voice], that's correct.

@PickleJr
Copy link
Author

Awesome, thanks again!

@hunterbeach
Copy link

I'm still getting this error on the rewrite branch with PyNaCl 1.2.1 and Python 3.7.0 when I try to load the Opus dll.

@Harmon758
Copy link
Contributor

This error occurs when installing from PyPI without a wheel.
It shouldn't have anything to do with loading Opus.

@hunterbeach
Copy link

It was the error I was getting when I did discord.opus.load_opus(Path_To_Opus_DLL) but I found it is automatically loaded on Windows so I suppose I avoided the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants