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

DTLSSocket intsllation on Windows #4

Open
pomallipeddi opened this issue Apr 16, 2021 · 9 comments
Open

DTLSSocket intsllation on Windows #4

pomallipeddi opened this issue Apr 16, 2021 · 9 comments

Comments

@pomallipeddi
Copy link

Intsllation of DTLSSocket on Windows fails.

Below is the result:

pip3 install --upgrade "aiocoap[tinydtls]"
Requirement already satisfied: aiocoap[tinydtls] in c:\users\poma\appdata\local\programs\python\python39\lib\site-packages (0.4.1)
Collecting DTLSSocket>=0.1.11a1
Using cached DTLSSocket-0.1.12.tar.gz (150 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: Cython in c:\users\poma\appdata\local\programs\python\python39\lib\site-packages (from DTLSSocket>=0.1.11a1->aiocoap[tinydtls]) (0.29.23)
Building wheels for collected packages: DTLSSocket
Building wheel for DTLSSocket (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\poma\appdata\local\programs\python\python39\python.exe' 'c:\users\poma\appdata\local\programs\python\python39\lib\site-packages\pip_vendor\pep517_in_process.py' build_wheel 'C:\Users\poma\AppData\Local\Temp\tmp50fmsn4a'
cwd: C:\Users\poma\AppData\Local\Temp\pip-install-qjnm36oe\dtlssocket_84d6e6abbabc4c5a833f9b11840f25e0
Complete output (11 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\DTLSSocket
copying DTLSSocket_init_.py -> build\lib.win-amd64-3.9\DTLSSocket
copying DTLSSocket\DTLSSocket.py -> build\lib.win-amd64-3.9\DTLSSocket
running build_ext
Running: autoconf
error: [WinError 2] The system cannot find the file specified

ERROR: Failed building wheel for DTLSSocket
Failed to build DTLSSocket
ERROR: Could not build wheels for DTLSSocket which use PEP 517 and cannot be installed directly

@chrysn
Copy link
Contributor

chrysn commented Apr 16, 2021

This was earlier reported at chrysn/aiocoap#232; title is a bit misleading, the same result can be obtained from a pip3 install DTLSSocket as reported there (which is why I sent @pomallipeddi here).

In UNIX environments usually all is there is all around so you don't need wheels, but on Windows that can't be taken for granted, so the questions that should probably be here are:

  • Does DTLSSocket work on Windows at all?
  • If so, would it be possible to ship win32 wheels via PyPI?
  • If not, is there any guidance that can be given to Windows users who see a "Running autconf / cannot find the file" error as to what they can install?

PS. @pomallipeddi please wrap copy-pasted command line output in ``` lines, this makes them readable and prevents regular output from turning the text into a huge heading. The preview button when composing or editing GitHub posts will help you in getting it right.

@pomallipeddi pomallipeddi changed the title "aiocoap[tinydtls]" intsllation on Windows DTLSSocket intsllation on Windows Apr 16, 2021
@kabel42
Copy link
Collaborator

kabel42 commented Apr 16, 2021

I don't have a Windows system to test this on or build wheels.
It looks like autoconf is not installed, could you test installing autoconf (and autoheader) und try again?
@chrysn i'll try to generate a more helpful error message

@pomallipeddi
Copy link
Author

I have tried installing the autoconf and still see the same error.
Below is the result from installing autoconf and DTLSSocket

---- pip install autoconf
Requirement already satisfied: autoconf in c:\users\poma\appdata\local\programs\python\python39\lib\site-packages (0.9.0)
Requirement already satisfied: typing-inspect>=0.4.0 in c:\users\poma\appdata\local\programs\python\python39\lib\site-packages (from autoconf) (0.6.0)
Requirement already satisfied: mypy-extensions>=0.3.0 in c:\users\poma\appdata\local\programs\python\python39\lib\site-packages (from typing-inspect>=0.4.0->autoconf) (0.4.3)
Requirement already satisfied: typing-extensions>=3.7.4 in c:\users\poma\appdata\local\programs\python\python39\lib\site-packages (from typing-inspect>=0.4.0->autoconf) (3.7.4.3)

---- pip install DTLSSocket
Collecting DTLSSocket
Using cached DTLSSocket-0.1.12.tar.gz (150 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: Cython in c:\users\poma\appdata\local\programs\python\python39\lib\site-packages (from DTLSSocket) (0.29.23)
Building wheels for collected packages: DTLSSocket
Building wheel for DTLSSocket (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\poma\appdata\local\programs\python\python39\python.exe' 'c:\users\poma\appdata\local\programs\python\python39\lib\site-packages\pip_vendor\pep517_in_process.py' build_wheel 'C:\Users\poma\AppData\Local\Temp\tmpgkct919k'
cwd: C:\Users\poma\AppData\Local\Temp\pip-install-0sjl4fyq\dtlssocket_eec89d0ce1a64415b9ec2800807f579a
Complete output (11 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\DTLSSocket
copying DTLSSocket_init_.py -> build\lib.win-amd64-3.9\DTLSSocket
copying DTLSSocket\DTLSSocket.py -> build\lib.win-amd64-3.9\DTLSSocket
running build_ext
Running: autoconf
error: [WinError 2] The system cannot find the file specified

@kabel42
Copy link
Collaborator

kabel42 commented Apr 19, 2021

Sorry for the confusion, that is probably not the autoconf package you want.
You will also need gcc to compile tinydtls.
You could try mingw or WSL if that is an Option for you.

@Thus0
Copy link
Contributor

Thus0 commented Jan 21, 2022

Hi

I had the same problem with autoconf error on Windows. It seems to be a shell problem.

I've modified setup.py and autoconf is running without error. I didn't try on linux if it would still compile

       commands =  [
                    ["sh", "-c", "autoconf"],
                    ["sh", "-c", "autoheader"],
                    ["sh", "-c", "./configure", "--without-ecc"],
                    ]

Result :

running build_py
running build_ext
Running: sh -c autoconf
Running: sh -c autoheader
Running: sh -c ./configure --without-ecc
configure: loading site script C:/msys64/etc/config.site
checking for doxygen... :
checking for etags... /bin/false
checking whether make sets $(MAKE)... yes

@g233hacker
Copy link

where did you find the setup.py file ?

@kabel42
Copy link
Collaborator

kabel42 commented Aug 12, 2022

the setup.py is in the root of the repo and the changes have been merged.

@mmurty
Copy link

mmurty commented May 18, 2023

I am having similar issues. Following is the output in my windows command prompt:

pip3 install DTLSSocket
Defaulting to user installation because normal site-packages is not writeable
Collecting DTLSSocket
Using cached DTLSSocket-0.1.14.tar.gz (156 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: Cython in c:\users\mm242\appdata\roaming\python\python39\site-packages (from DTLSSocket) (0.29.34)
Building wheels for collected packages: DTLSSocket
Building wheel for DTLSSocket (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files\python39\python.exe' 'c:\program files\python39\lib\site-packages\pip_vendor\pep517\in_process_in_process.py' build_wheel 'C:\Users\mm242\AppData\Local\Temp\tmpbfpfxjh0'
cwd: C:\Users\mm242\AppData\Local\Temp\pip-install-q3c409ih\dtlssocket_393fbea23055487c92331731a5ccbc95
Complete output (11 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\DTLSSocket
copying DTLSSocket_init_.py -> build\lib.win-amd64-cpython-39\DTLSSocket
copying DTLSSocket\DTLSSocket.py -> build\lib.win-amd64-cpython-39\DTLSSocket
running build_ext
Running: sh -c autoconf
Trying to run sh failed, please make sure sh is installed

ERROR: Failed building wheel for DTLSSocket
Failed to build DTLSSocket
ERROR: Could not build wheels for DTLSSocket which use PEP 517 and cannot be installed directly

@kabel42
Copy link
Collaborator

kabel42 commented May 18, 2023

it looks like you don't have a sh compatible shell in your path.
the easiest way to get a working build environment is probably to use mingw, msys ot wsl. If you have already set that up your path might not be configured correctly.

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

6 participants