質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Python 2.7

Python 2.7は2.xシリーズでは最後のメジャーバージョンです。Python3.1にある機能の多くが含まれています。

pip

pipとは、Pythonを用いて書かれているパッケージソフトのインストールや管理を行うためのパッケージマネジメントシステムです。pipを使う主なメリットは、コマンドラインインターフェースにて容易にPythonパッケージソフトをインストール可能だという点です。

Q&A

解決済

2回答

918閲覧

python2.7にpip install python-pkcs11 失敗

rev_timo

総合スコア117

Python 2.7

Python 2.7は2.xシリーズでは最後のメジャーバージョンです。Python3.1にある機能の多くが含まれています。

pip

pipとは、Pythonを用いて書かれているパッケージソフトのインストールや管理を行うためのパッケージマネジメントシステムです。pipを使う主なメリットは、コマンドラインインターフェースにて容易にPythonパッケージソフトをインストール可能だという点です。

0グッド

0クリップ

投稿2017/10/22 12:59

python のバージョンは2.7です。環境はwindow 8.1です。
pkcs11 を pipからinstallしようとしたらエラーになりまして、なぜかわかりません。
ご存知の方よろしくお願いします。

###エラー内容
C:\Python27\Scripts>pip install python-pkcs11
Collecting python-pkcs11
Using cached python-pkcs11-0.4.0.tar.gz
Complete output from command python setup.py egg_info:
Compiling c:\users\tuangp1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cython\Plex\Sca
nners.py because it changed.
Compiling c:\users\tuangp
1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cython\Plex\Act
ions.py because it changed.
Compiling c:\users\tuangp1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cython\Compiler
\Pythran.py because it changed.
Compiling c:\users\tuangp
1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cython\Compiler
\Lexicon.py because it changed.
Compiling c:\users\tuangp1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cython\Compiler
\Scanning.py because it changed.
Compiling c:\users\tuangp
1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cython\Compiler
\Parsing.py because it changed.
Compiling c:\users\tuangp1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cython\Compiler
\Visitor.py because it changed.
Compiling c:\users\tuangp
1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cython\Compiler
\FlowControl.py because it changed.
Compiling c:\users\tuangp1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cython\Compiler
\Code.py because it changed.
Compiling c:\users\tuangp
1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cython\Runtime
refnanny.pyx because it changed.
Compiling c:\users\tuangp~1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cython\Tempita
tempita.py because it changed.
[ 1/11] Cythonizing c:\users\tuangp1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cytho
n\Compiler\Code.py
[ 2/11] Cythonizing c:\users\tuangp
1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cytho
n\Compiler\FlowControl.py
[ 3/11] Cythonizing c:\users\tuangp1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cytho
n\Compiler\Lexicon.py
[ 4/11] Cythonizing c:\users\tuangp
1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cytho
n\Compiler\Parsing.py
[ 5/11] Cythonizing c:\users\tuangp1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cytho
n\Compiler\Pythran.py
[ 6/11] Cythonizing c:\users\tuangp
1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cytho
n\Compiler\Scanning.py
[ 7/11] Cythonizing c:\users\tuangp1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cytho
n\Compiler\Visitor.py
[ 8/11] Cythonizing c:\users\tuangp
1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cytho
n\Plex\Actions.py
[ 9/11] Cythonizing c:\users\tuangp1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cytho
n\Plex\Scanners.py
[10/11] Cythonizing c:\users\tuangp
1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cytho
n\Runtime\refnanny.pyx
[11/11] Cythonizing c:\users\tuangp1\appdata\local\temp\easy_install-ebiqis\Cython-0.27.1\Cytho
n\Tempita_tempita.py
Unable to find pgen, not compiling formal grammar.
warning: no files found matching '2to3-fixers.txt'
warning: no files found matching 'Doc*'
warning: no files found matching '.pyx' under directory 'Cython\Debugger\Tests'
warning: no files found matching '
.pxd' under directory 'Cython\Debugger\Tests'
warning: no files found matching '*.pxd' under directory 'Cython\Utility'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\tuangp
1\appdata\local\temp\pip-build-b67fry\python-pkcs11\setup.py", line 65,
in <module>
test_suite='tests',
File "c:\python27\lib\distutils\core.py", line 111, in setup
setup_distribution = dist = klass(attrs)
File "c:\python27\lib\site-packages\setuptools\dist.py", line 335, in init
self.fetch_build_eggs(attrs['setup_requires'])
File "c:\python27\lib\site-packages\setuptools\dist.py", line 456, in fetch_build_eggs
replace_conflicting=True,
File "c:\python27\lib\site-packages\pkg_resources_init
.py", line 863, in resolve
replace_conflicting=replace_conflicting
File "c:\python27\lib\site-packages\pkg_resources_init
.py", line 1141, in best_match
return self.obtain(req, installer)
File "c:\python27\lib\site-packages\pkg_resources_init_.py", line 1153, in obtain
return installer(requirement)
File "c:\python27\lib\site-packages\setuptools\dist.py", line 522, in fetch_build_egg
return cmd.easy_install(req)
File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line 672, in easy_ins
tall
return self.install_item(spec, dist.location, tmpdir, deps)
File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line 698, in install_
item
dists = self.install_eggs(spec, download, tmpdir)
File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line 879, in install_
eggs
return self.build_and_install(setup_script, setup_base)
File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line 1118, in build_a
nd_install
self.run_setup(setup_script, setup_base, args)
File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line 1106, in run_set
up
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: Microsoft Visual C++ 9.0 is req
uired. Get it from http://aka.ms/vcpython27

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in c:\users\tuangp~1\appdata\local\temp
pip-build-b67fry\python-pkcs11\

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答2

0

エラーメッセージの最後の一文になぜか書いてあります。

Microsoft Visual C++ 9.0 is req
uired. Get it from http://aka.ms/vcpython27

投稿2017/10/22 13:20

YouheiSakurai

総合スコア6142

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

rev_timo

2017/10/22 23:53

回答ありがとうございます。そうですね、Microsoft Visual C++ 9.0 が必要と書いてありますよね、 やっぱり、このモジュールはPython 2.7にインストールできないことをわかりました。
guest

0

自己解決

Python 2.7にはインストールできないことでした。

投稿2017/10/22 23:54

rev_timo

総合スコア117

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問