Comments (15)
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.
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.
Sometimes it just need to install full VisualStudio community edition with python. it depends on what libraries have installed on pc.
from pyscard.
The building documentation is at https://github.com/LudovicRousseau/pyscard/blob/master/README
from pyscard.
Same problem on Ubuntu 17.10. Installing swig3.0
fixed the issue.
# sudo apt-get install swig3.0
from pyscard.
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
- Install the chocolately package manager
- Open a powershell as administrator mode, run
choco install swig
- Then in the same window, install pyscard by
pip install pyscard
And done!
from pyscard.
Install SWIG http://www.swig.org/
It is not a Python package.
from pyscard.
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.
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.
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.
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.
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.
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.
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.
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)
- Unable to install 2.0.5 HOT 2
- Fix: DEPRECATION: pyscard is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. HOT 3
- Download artifacts for Windows HOT 2
- Windows EXE and MSI missing for Python 3.10 in collected artifacts HOT 3
- Wheels for macOS (all Python versions) HOT 11
- Consolidate GHA pipeline (cross-platform tests, PyPI releases) HOT 2
- Some missing steps in "Installing on windows from the binary distribution" HOT 4
- Failed to list readers: The Smart Card Resource Manager is not running HOT 7
- OS-dependent behaviour: HOT 4
- I can not read more than 8 cards, I think it is the cache memory of the library HOT 5
- Order of readers in list change arbitrarily HOT 15
- Typo in some method names in documentation HOT 1
- python3 -m pip install pyscard fails on MacOS HOT 2
- drop deprecated use of `imp` HOT 2
- pyscard seems to be not thread save HOT 2
- new release? HOT 1
- 2.0.8: compile time warnings HOT 3
- TypeError: CardRequestTimeoutException.__init__() got an unexpected keyword argument 'hresult' HOT 1
- Unexpected keyword argument 'hresult' for CardRequestTimeoutException HOT 2
- pyscard mutes/hides user created exceptions in `on_insert()` hook. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyscard.