Giter VIP home page Giter VIP logo

Comments (15)

LudovicRousseau avatar LudovicRousseau commented on June 16, 2024 3

I do not use or know Windows. I can't really help you.

You can get (automatic builds) binary installers for Windows at https://ci.appveyor.com/project/LudovicRousseau/pyscard, then select your Python and system configuration, then go to Artefacts.

from pyscard.

LudovicRousseau avatar LudovicRousseau commented on June 16, 2024 3

Thanks @Hunu

I updated the install documentation https://github.com/LudovicRousseau/pyscard/blob/master/INSTALL.md#installing-on-windows-from-the-source-distribution

from pyscard.

merlokk avatar merlokk commented on June 16, 2024 2

Sometimes it just need to install full VisualStudio community edition with python. it depends on what libraries have installed on pc.

from pyscard.

LudovicRousseau avatar LudovicRousseau commented on June 16, 2024 1

The building documentation is at https://github.com/LudovicRousseau/pyscard/blob/master/README

from pyscard.

rask avatar rask commented on June 16, 2024 1

Same problem on Ubuntu 17.10. Installing swig3.0 fixed the issue.

# sudo apt-get install swig3.0

from pyscard.

Hunu avatar Hunu commented on June 16, 2024 1

In case of someone else meet the same issue:
I'm running win10x64 and had the same error as DPSB.
After a lot of searching, I found swig is available in chocolately package manager
My solution was

  1. Install the chocolately package manager
  2. Open a powershell as administrator mode, run
    choco install swig
  3. Then in the same window, install pyscard by
    pip install pyscard
    And done!

from pyscard.

LudovicRousseau avatar LudovicRousseau commented on June 16, 2024

Install SWIG http://www.swig.org/
It is not a Python package.

from pyscard.

DPSB avatar DPSB commented on June 16, 2024

Thx, installing now swigwin-3.0.12 and try it out.

Would be nice to have a note on the documentation that SWIG is needed along with all other not mentioned dependencys.
Maybe also the Swig version which the author uses. (for compability)
(I'll bet its not installed on most Windows Systems)

Ok, Swig error is gone after downloading latest windows pre-build version and adding it to OS path variable, but now the next dependency is missing:

Collecting pyscard
  Using cached pyscard-1.9.6.tar.gz
Installing collected packages: pyscard
  Running setup.py install for pyscard: started
    Running setup.py install for pyscard: finished with status 'error'
    Complete output from command F:\Python\Python3-4-4-x64\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\luckystrike\\AppData\\Local\\Temp\\pycharm-packaging\\pyscard\\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\LUCKYS~1\AppData\Local\Temp\pip-f_gwlvrd-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    running build_ext
    building 'smartcard.scard._scard' extension
    swigging smartcard/scard/scard.i to smartcard/scard/scard_wrap.c
    C:\Tools\swigwin-3.0.12\swig.exe -python -outdir smartcard/scard -DWIN32 -o smartcard/scard/scard_wrap.c smartcard/scard/scard.i
    error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
    
    ----------------------------------------

Command "F:\Python\Python3-4-4-x64\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\luckystrike\\AppData\\Local\\Temp\\pycharm-packaging\\pyscard\\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\LUCKYS~1\AppData\Local\Temp\pip-f_gwlvrd-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\luckystrike\AppData\Local\Temp\pycharm-packaging\pyscard\

So Visual C++ 10.0 is required too, anything else needed?

from pyscard.

DPSB avatar DPSB commented on June 16, 2024

After installing VC 2010 Express i got the following error:

Pycharm:


Collecting pyscard
  Using cached pyscard-1.9.6.tar.gz
Installing collected packages: pyscard
  Running setup.py install for pyscard: started
    Running setup.py install for pyscard: finished with status 'error'
    Complete output from command F:\Python\Python3-4-4-x64\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\luckystrike\\AppData\\Local\\Temp\\pycharm-packaging\\pyscard\\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\LUCKYS~1\AppData\Local\Temp\pip-xdbjx2gy-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    running build_ext
    building 'smartcard.scard._scard' extension
    swigging smartcard/scard/scard.i to smartcard/scard/scard_wrap.c
    C:\Tools\swigwin-3.0.12\swig.exe -python -outdir smartcard/scard -DWIN32 -o smartcard/scard/scard_wrap.c smartcard/scard/scard.i
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\luckystrike\AppData\Local\Temp\pycharm-packaging\pyscard\setup.py", line 165, in <module>
        setup(**kw)
      File "F:\Python\Python3-4-4-x64\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "F:\Python\Python3-4-4-x64\lib\distutils\dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "F:\Python\Python3-4-4-x64\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "F:\Python\Python3-4-4-x64\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "F:\Python\Python3-4-4-x64\lib\distutils\command\install.py", line 539, in run
        self.run_command('build')
      File "F:\Python\Python3-4-4-x64\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "F:\Python\Python3-4-4-x64\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "F:\Python\Python3-4-4-x64\lib\distutils\command\build.py", line 126, in run
        self.run_command(cmd_name)
      File "F:\Python\Python3-4-4-x64\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "F:\Python\Python3-4-4-x64\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "C:\Users\luckystrike\AppData\Local\Temp\pycharm-packaging\pyscard\setup.py", line 91, in run
        self.run_command('build_ext')
      File "F:\Python\Python3-4-4-x64\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "F:\Python\Python3-4-4-x64\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "F:\Python\Python3-4-4-x64\lib\site-packages\setuptools\command\build_ext.py", line 49, in run
        _build_ext.run(self)
      File "F:\Python\Python3-4-4-x64\lib\distutils\command\build_ext.py", line 339, in run
        self.build_extensions()
      File "F:\Python\Python3-4-4-x64\lib\distutils\command\build_ext.py", line 448, in build_extensions
        self.build_extension(ext)
      File "F:\Python\Python3-4-4-x64\lib\site-packages\setuptools\command\build_ext.py", line 174, in build_extension
        _build_ext.build_extension(self, ext)
      File "F:\Python\Python3-4-4-x64\lib\distutils\command\build_ext.py", line 503, in build_extension
        depends=ext.depends)
      File "F:\Python\Python3-4-4-x64\lib\distutils\msvc9compiler.py", line 460, in compile
        self.initialize()
      File "F:\Python\Python3-4-4-x64\lib\distutils\msvc9compiler.py", line 371, in initialize
        vc_env = query_vcvarsall(VERSION, plat_spec)
      File "F:\Python\Python3-4-4-x64\lib\site-packages\setuptools\msvc9_support.py", line 52, in query_vcvarsall
        return unpatched['query_vcvarsall'](version, *args, **kwargs)
      File "F:\Python\Python3-4-4-x64\lib\distutils\msvc9compiler.py", line 287, in query_vcvarsall
        raise ValueError(str(list(result.keys())))
    ValueError: ['path']
    

Command "F:\Python\Python3-4-4-x64\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\luckystrike\\AppData\\Local\\Temp\\pycharm-packaging\\pyscard\\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\LUCKYS~1\AppData\Local\Temp\pip-xdbjx2gy-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\luckystrike\AppData\Local\Temp\pycharm-packaging\pyscard\

from pyscard.

micsthepick avatar micsthepick commented on June 16, 2024

It took me a while to find the binaries, as the link just redirects you to a different page. What you need to do if this is happening is to go directly to https://ci.appveyor.com/project/LudovicRousseau/pyscard, look under "JOB NAME" for the correct environment, copy the address that is linked there, and paste it into the url box, adding /artifacts to the end.

from pyscard.

LudovicRousseau avatar LudovicRousseau commented on June 16, 2024

Does someone knows how to define a dependency on swig3 in setup.py?
The idea is to get a more explicit error message.

from pyscard.

wzulfikar avatar wzulfikar commented on June 16, 2024

the pip install pyscard also fails in mac. installing swig (inspired from @rask answer) from brew using brew install swig and re-running pip install pyscard did the job.

from pyscard.

LudovicRousseau avatar LudovicRousseau commented on June 16, 2024

Pypi now provides 2 windows Wheel files (from https://ci.appveyor.com/project/LudovicRousseau/pyscard):

  • pyscard-1.9.8-cp27-cp27m-win_amd64.whl
  • pyscard-1.9.8-cp36-cp36m-win_amd64.whl

It should be simple to install one of these with pip install

from pyscard.

DPSB avatar DPSB commented on June 16, 2024

Sometimes it just need to install full VisualStudio community edition with python. it depends on what libraries have installed on pc.

This may be a temporary workaround, but totally unacceptable for productive use. Why install a oversized IDE when only requiring 1 or 2 files.

Pypi now provides 2 windows Wheel files (from https://ci.appveyor.com/project/LudovicRousseau/pyscard):

* pyscard-1.9.8-cp27-cp27m-win_amd64.whl

* pyscard-1.9.8-cp36-cp36m-win_amd64.whl

It should be simple to install one of these with pip install

Thanks, i will test it within the next couple of days and report back

from pyscard.

LudovicRousseau avatar LudovicRousseau commented on June 16, 2024

From my experience I have no issues with pyscard when install Python from miniconda https://docs.conda.io/en/latest/miniconda.html

from pyscard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.