Closed DPSB closed 2 years ago
Install SWIG http://www.swig.org/ It is not a Python package.
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?
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\
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.
The building documentation is at https://github.com/LudovicRousseau/pyscard/blob/master/README
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.
Same problem on Ubuntu 17.10. Installing swig3.0
fixed the issue.
# sudo apt-get install swig3.0
Does someone knows how to define a dependency on swig3 in setup.py
?
The idea is to get a more explicit error message.
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.
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
choco install swig
pip install pyscard
And done!Thanks @Hunu
I updated the install documentation https://github.com/LudovicRousseau/pyscard/blob/master/INSTALL.md#installing-on-windows-from-the-source-distribution
Sometimes it just need to install full VisualStudio community edition with python. it depends on what libraries have installed on pc.
Pypi now provides 2 windows Wheel files (from https://ci.appveyor.com/project/LudovicRousseau/pyscard):
It should be simple to install one of these with pip install
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 my experience I have no issues with pyscard when install Python from miniconda https://docs.conda.io/en/latest/miniconda.html
Hello,
i'm trying to install pyscard but pip installation fails. Seems like missing dependency's(?) OS Win 7-x64 Command: python -m pip install pyscard Tested with Python 3.4.4-x64, 3.4.4-x86, 3.6.2-x64, 3.6.2-x86
Output from Pycharm
Output from CMD
Swig.exe failed No such file or directory I'll guess this is some undocumented dependency? http://www.swig.org/download.html This one? Which version?