Last active
May 18, 2016 16:26
-
-
Save kashewnuts/dbe6dbf268eebed70695ce04aae4350f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sys.path確認 | |
> python | |
Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on win32 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import sys;print sys.path | |
['', 'C:\\WINDOWS\\SYSTEM32\\python27.zip', 'C:\\Python\\27\\DLLs', 'C:\\Python\\27\\lib', 'C:\\Python\\27\\lib\\plat-win', 'C:\\Python\\27\\lib\\lib-tk', 'C:\\Python\\27', 'C:\\Python\\27\\lib\\site-packages', 'C:\\Python\\27\\lib\\site-packages\\win32', 'C:\\Python\\27\\lib\\site-packages\\win32\\lib', 'C:\\Python\\27\\lib\\site-packages\\Pythonwin'] | |
# 実行時エラー内容 | |
> rst2html.py --version | |
Traceback (most recent call last): | |
File "C:\Python\27\Scripts\rst2html.py", line 17, in <module> | |
from docutils.core import publish_cmdline, default_description | |
ImportError: No module named docutils.core | |
# 関連付け確認 | |
C:\Users\KashunYoshida>head test.py | |
# -*- coding: utf-8 -*- | |
import sys | |
print(sys.executable) | |
C:\Users\KashunYoshida>python test.py | |
C:\Python\27\python.exe |
対応
$python test.py
でなく、 $test.py
で実行したら C:\Users\KashunYoshida\.virtualenvs\test\Scripts\python.exe
とvirtualenvのpythonを見ていたので、以下の内容を実施して修正した。
- deactivateコマンド実行
- test.pyの右クリックのメニューから関連付けを修正
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
現象
インタラクティブシェルやVimのjedi-vimプラグインではインポートされるが、コマンドプロンプトから起動できない。
環境