LudovicRousseau / pyscard

pyscard smartcard library for python
http://pyscard.sourceforge.net/
GNU Lesser General Public License v2.1
377 stars 108 forks source link

Some missing steps in "Installing on windows from the binary distribution" #152

Closed Leo-Raumann closed 1 year ago

Leo-Raumann commented 1 year ago

I had to overcome several errors when trying pip install pyscard:

  1. I had to download swig and add to path
  2. I got error that MSVC v14 or higher is required, so I installed it from https://visualstudio.microsoft.com/de/visual-cpp-build-tools/
  3. still got error with pip install and also when installing setup from repo as zip: ... helpers.c smartcard/scard/helpers.c(22): fatal error C1083: Datei (Include) cannot be opened: "windows.h": No such file or directory error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit code 2 [end of output]

Then I installed more from build tools (Windows 10 SDK, c++ Cmake tools, core functions) and finally the installation was successfull.

Please add more installation information for other newcomers like me and thanks for all you work!

LudovicRousseau commented 1 year ago

Have you read the documentation at https://github.com/LudovicRousseau/pyscard/blob/master/INSTALL.md#installing-on-windows-from-the-source-distribution ?

Several binary versions for Windows are available from PyPI at https://pypi.org/project/pyscard/#files Unfortunately the version for Python 3.11 is not available.

Leo-Raumann commented 1 year ago

I was referring to https://github.com/LudovicRousseau/pyscard/blob/master/INSTALL.md#installing-on-windows-from-the-binary-distribution... seems I need to do some homework and understand first, why pip install can be used for both (binary and source distribution).

LudovicRousseau commented 1 year ago

pip install will try to install a pre-build binary if available. But such a pre-build is not available for Python 3.11 so it tries to build & install from the source code.

LudovicRousseau commented 1 year ago

PyPi now provides a binary installer for Python 3.11 on Windows since PySCard 2.0.6 released in March 2023.