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

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

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

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Q&A

1回答

4050閲覧

vimエディターにてpython3を有効にしたい

wasabi1073js

総合スコア14

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

0グッド

0クリップ

投稿2018/05/27 12:49

編集2018/06/04 13:57

vimエディターでPython3を有効にしたいです。

※現状vimのバージョンを確認したところ、”-python3”と表示されていることを確認しております

■やったこと
1.https://github.com/vim/vimからvim-masterファイルをダウンロード
2.下記①のコマンドで解凍
3.下記②のコマンドでvim-7.4.884ディレクトリへ移動
4.下記③のコマンドでpython3を有効にするオプションを付与
5.下記④のコマンドでビルド
※参考サイト⇨(http://note.kurodigi.com/vim-selfbuild/)

■OS
Linux SolydX 9

===================================
以上の5つの手順を実行しましたが、
そのあとにvimのバージョンを確認しても"-python3"のまま表示されておりました。
これを+python3へ変更する方法をご教示いただきたいです。
※見当違いのことをしているようでしたら申し訳ありません

何卒、よろしくお願いいたします。

#① $ tar -xvf v7.4.884.tar.gz #② $ cd vim-7.4.884 #③ $ ./configure \ > --prefix=/usr \ > --localstatedir=/var/lib/vim \ > --with-features=huge \ > --enable-gpm \ > --enable-acl \ > --with-x=yes \ > --enable-gui=gtk2 \ > --enable-multibyte \ > --enable-cscope \ > --enable-netbeans \ > --enable-python3interp \ #④ $ make

===================================
6/4追記
===================================

python3.5の場所についてですが、
以下の出力結果になりました。

$which python3.5 /usr/bin/python3.5

ちなみに関係はないのかもしれませんが、
python3だと、以下のようになりました。

$which python3 /home/(USER)/anaconda3/python3

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

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

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

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

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

mkgrei

2018/05/27 16:24

OSの環境などにもよりますが、python3のパスを明示的に渡せませんか?
wasabi1073js

2018/05/29 05:25

無知なため、パスを渡す方法がわかりません。また様々なサイトを見る限りvimを再ビルドする必要があると書かれているので、それのみが解決法なのかと認識しております;
yag1kaz

2018/06/04 00:43

お困りのようですね。お察しします。configureなどのコマンド投入時の結果出力をここに貼り付けると有効なアドバイスが得られるかもしれません。
yag1kaz

2018/06/04 00:44

例えば、Pythonのディレクトリ指定などは現在の環境とあっていますでしょうか?そういったものが一致していない場合、なんらかのエラーメッセージが出ているのではないかと思います。
wasabi1073js

2018/06/04 13:39

アドバイスいただきありがとうございます。情報を追記してみました。自分でも改めて試行錯誤をしてみます。
wasabi1073js

2018/06/04 13:42

whichコマンドを使用して確認しましたが、pythonのディレクトリ指定も合っていると認識しております。(2018/05/29 14:23の手順をディレクトリ指定を確認した上で改めて行いましたが、だめでした。)
guest

回答1

0

投稿2018/05/27 21:27

mkgrei

総合スコア8560

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

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

wasabi1073js

2018/05/29 05:23 編集

ご教示いただき、ありがとうございます。 サイトを参照させていただき、 下記操作を上から順に行いましたが、 "-python3"のままで有効にはなっていませんでした。 下記の操作で誤っている箇所(自分の認識が間違っている箇所)があるかもしれません。 申し訳ありませんが、一度ご確認をお願いできないでしょうか。 よろしくお願いいたします。 ================================== 1. sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev \ libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \ libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev \ ruby-dev mercurial 2. sudo apt-get remove vim vim-runtime gvim vim-tiny vim-common vim-gui-common 3. 下記サイトからダウンロード https://code.google.com/p/vim/ (hgコマンドが使えなかったために直接ダウンロードしました  ※Mercurialはインストール済です) 4. unzip /home/(USER)/Downloads/vim-master.zip 5. cd /Downloads/vim-master/ 6. ./configure --with-features=huge \ --enable-multibyte \ --enable-rubyinterp \ --enable-python3interp vi_cv_path_python3=/usr/bin/python3.4 \ --with-python3-config-dir=/usr/bin/python3.5/config-3.5m-x86_64-linux-gnu \ --enable-perlinterp \ --enable-luainterp \ --enable-gui=gtk2 --enable-cscope --prefix=/usr 7. make VIMRUNTIMEDIR=/usr/share/vim/vim74 8. sudo apt-get install checkinstall 9. sudo checkinstall 10. sudo make install
wasabi1073js

2018/06/04 13:43 編集

▼2018/05/29 14:23の手順6を実行後の結果です configure: creating cache auto/config.cache checking whether make sets $(MAKE)... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for gcc option to accept ISO C99... none needed checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for fgrep... /bin/grep -F checking for library containing strerror... none required checking for gawk... gawk checking for strip... strip checking for ANSI C header files... yes checking for sys/wait.h that is POSIX.1 compatible... yes checking for unsigned long long int... yes checking for long long int... yes checking if the compiler supports trailing commas... yes checking if the compiler supports C++ comments... yes checking --enable-fail-if-missing argument... no checking for clang version... N/A configure: checking for buggy tools... checking for BeOS... no checking for QNX... no checking for Darwin (Mac OS X)... no checking AvailabilityMacros.h usability... no checking AvailabilityMacros.h presence... no checking for AvailabilityMacros.h... no checking --with-local-dir argument... Defaulting to /usr/local checking --with-vim-name argument... Defaulting to vim checking --with-ex-name argument... Defaulting to ex checking --with-view-name argument... Defaulting to view checking --with-global-runtime argument... no checking --with-modified-by argument... no checking if character set is EBCDIC... no checking --disable-smack argument... no checking linux/xattr.h usability... yes checking linux/xattr.h presence... yes checking for linux/xattr.h... yes checking attr/xattr.h usability... no checking attr/xattr.h presence... no checking for attr/xattr.h... no checking --disable-selinux argument... no checking for is_selinux_enabled in -lselinux... yes checking selinux/selinux.h usability... yes checking selinux/selinux.h presence... yes checking for selinux/selinux.h... yes checking --with-features argument... huge checking --with-compiledby argument... no checking --disable-xsmp argument... no checking --disable-xsmp-interact argument... no checking --enable-luainterp argument... yes checking --with-lua-prefix argument... no checking LUA_PREFIX environment var... not set, default to /usr checking --with-luajit... no checking for lua... no checking if lua.h can be found in /usr/include... no checking if lua.h can be found in /usr/include/lua... no checking --enable-mzschemeinterp argument... no checking --enable-perlinterp argument... yes checking for perl... /usr/bin/perl checking Perl version... OK checking if compile and link flags for Perl are sane... no: PERL DISABLED checking --enable-pythoninterp argument... no checking --enable-python3interp argument... yes checking --with-python3-command argument... no checking Python version... auto/configure: line 6638: /usr/bin/python3.4: No such file or directory checking Python is 3.0 or better... auto/configure: line 6645: /usr/bin/python3.4: No such file or directory too old checking --enable-tclinterp argument... no checking --enable-rubyinterp argument... yes checking --with-ruby-command argument... defaulting to ruby checking for ruby... /usr/bin/ruby checking Ruby version... OK checking Ruby rbconfig... RbConfig checking Ruby header files... /usr/include/ruby-2.3.0 checking --enable-cscope argument... yes checking --enable-workshop argument... no checking --disable-netbeans argument... no checking --disable-channel argument... no checking for socket in -lsocket... no checking for gethostbyname in -lnsl... yes checking whether compiling with process communication is possible... yes checking --enable-terminal argument... defaulting to yes checking --enable-autoservername argument... no checking --enable-multibyte argument... yes checking --enable-hangulinput argument... no checking --enable-xim argument... defaulting to auto checking --enable-fontset argument... no checking for xmkmf... no checking for X... libraries , headers checking for gethostbyname... yes checking for connect... yes checking for remove... yes checking for shmat... yes checking for IceConnectionNumber in -lICE... yes checking if X11 header files can be found... yes checking for _XdmcpAuthDoIt in -lXdmcp... yes checking for IceOpenConnection in -lICE... yes checking for XpmCreatePixmapFromData in -lXpm... yes checking if X11 header files implicitly declare return values... no checking size of wchar_t is 2 bytes... no checking --enable-gui argument... GTK+ 2.x GUI support checking --disable-gtktest argument... gtk test enabled checking for pkg-config... /usr/bin/pkg-config checking for GTK - version >= 2.2.0... yes; found version 2.24.31 checking version of Gdk-Pixbuf... OK. checking for glib-compile-resources... /home/koxtuichi/anaconda3/bin/glib-compile-resources checking glib-compile-resources... usable. checking --disable-icon-cache-update argument... not set checking for gtk-update-icon-cache... /usr/bin/gtk-update-icon-cache checking --disable-desktop-database-update argument... not set checking for update-desktop-database... /usr/bin/update-desktop-database checking X11/SM/SMlib.h usability... yes checking X11/SM/SMlib.h presence... yes checking for X11/SM/SMlib.h... yes checking X11/xpm.h usability... yes checking X11/xpm.h presence... yes checking for X11/xpm.h... yes checking X11/Sunkeysym.h usability... yes checking X11/Sunkeysym.h presence... yes checking for X11/Sunkeysym.h... yes checking for XIMText in X11/Xlib.h... yes X GUI selected; xim has been enabled checking for /proc link to executable... /proc/self/exe checking for CYGWIN or MSYS environment... no checking whether toupper is broken... no checking whether __DATE__ and __TIME__ work... yes checking whether __attribute__((unused)) is allowed... yes checking elf.h usability... yes checking elf.h presence... yes checking for elf.h... yes checking for main in -lelf... no checking for dirent.h that defines DIR... yes checking for library containing opendir... none required checking stdint.h usability... yes checking stdint.h presence... yes checking for stdint.h... yes checking stdlib.h usability... yes checking stdlib.h presence... yes checking for stdlib.h... yes checking string.h usability... yes checking string.h presence... yes checking for string.h... yes checking sys/select.h usability... yes checking sys/select.h presence... yes checking for sys/select.h... yes checking sys/utsname.h usability... yes checking sys/utsname.h presence... yes checking for sys/utsname.h... yes checking termcap.h usability... yes checking termcap.h presence... yes checking for termcap.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sgtty.h usability... yes checking sgtty.h presence... yes checking for sgtty.h... yes checking sys/ioctl.h usability... yes checking sys/ioctl.h presence... yes checking for sys/ioctl.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/types.h usability... yes checking sys/types.h presence... yes checking for sys/types.h... yes checking termio.h usability... yes checking termio.h presence... yes checking for termio.h... yes checking iconv.h usability... yes checking iconv.h presence... yes checking for iconv.h... yes checking inttypes.h usability... yes checking inttypes.h presence... yes checking for inttypes.h... yes checking langinfo.h usability... yes checking langinfo.h presence... yes ・ ・ ・ (続きあり)
wasabi1073js

2018/06/04 13:34

(上のコメントの続きです) ・ ・ ・ checking for langinfo.h... yes checking math.h usability... yes checking math.h presence... yes checking for math.h... yes checking unistd.h usability... yes checking unistd.h presence... yes checking for unistd.h... yes checking stropts.h usability... yes checking stropts.h presence... yes checking for stropts.h... yes checking errno.h usability... yes checking errno.h presence... yes checking for errno.h... yes checking sys/resource.h usability... yes checking sys/resource.h presence... yes checking for sys/resource.h... yes checking sys/systeminfo.h usability... no checking sys/systeminfo.h presence... no checking for sys/systeminfo.h... no checking locale.h usability... yes checking locale.h presence... yes checking for locale.h... yes checking sys/stream.h usability... no checking sys/stream.h presence... no checking for sys/stream.h... no checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking libc.h usability... no checking libc.h presence... no checking for libc.h... no checking sys/statfs.h usability... yes checking sys/statfs.h presence... yes checking for sys/statfs.h... yes checking poll.h usability... yes checking poll.h presence... yes checking for poll.h... yes checking sys/poll.h usability... yes checking sys/poll.h presence... yes checking for sys/poll.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking utime.h usability... yes checking utime.h presence... yes checking for utime.h... yes checking sys/param.h usability... yes checking sys/param.h presence... yes checking for sys/param.h... yes checking libintl.h usability... yes checking libintl.h presence... yes checking for libintl.h... yes checking libgen.h usability... yes checking libgen.h presence... yes checking for libgen.h... yes checking util/debug.h usability... no checking util/debug.h presence... no checking for util/debug.h... no checking util/msg18n.h usability... no checking util/msg18n.h presence... no checking for util/msg18n.h... no checking frame.h usability... no checking frame.h presence... no checking for frame.h... no checking sys/acl.h usability... no checking sys/acl.h presence... no checking for sys/acl.h... no checking sys/access.h usability... no checking sys/access.h presence... no checking for sys/access.h... no checking sys/sysinfo.h usability... yes checking sys/sysinfo.h presence... yes checking for sys/sysinfo.h... yes checking wchar.h usability... yes checking wchar.h presence... yes checking for wchar.h... yes checking wctype.h usability... yes checking wctype.h presence... yes checking for wctype.h... yes checking for sys/ptem.h... no checking for sys/sysctl.h... yes checking for pthread_np.h... no checking strings.h usability... yes checking strings.h presence... yes checking for strings.h... yes checking if strings.h can be included after string.h... yes checking whether gcc needs -traditional... no checking for an ANSI C-conforming const... yes checking for working volatile... yes checking for mode_t... yes checking for off_t... yes checking for pid_t... yes checking for size_t... yes checking for uid_t in sys/types.h... yes checking for uint32_t... yes checking whether time.h and sys/time.h may both be included... yes checking for ino_t... yes checking for dev_t... yes checking whether byte ordering is bigendian... no checking for inline... inline checking for rlim_t... yes checking for stack_t... yes checking whether stack_t has an ss_base field... no checking --with-tlib argument... empty: automatic terminal library selection checking for tgetent in -ltinfo... yes checking whether we talk terminfo... yes checking what tgetent() returns for an unknown terminal... zero checking whether termcap.h contains ospeed... yes checking whether termcap.h contains UP, BC and PC... yes checking whether tputs() uses outfuntype... no checking whether sys/select.h and sys/time.h may both be included... yes checking for /dev/ptc... no checking for SVR4 ptys... yes checking for ptyranges... don't know checking default tty permissions/group... can't determine - assume ptys are world accessible world checking return type of signal handlers... void checking for struct sigcontext... yes checking getcwd implementation is broken... no checking for fchdir... yes checking for fchown... yes checking for fchmod... yes checking for fsync... yes checking for getcwd... yes checking for getpseudotty... no checking for getpwent... yes checking for getpwnam... yes checking for getpwuid... yes checking for getrlimit... yes checking for gettimeofday... yes checking for getwd... yes checking for lstat... yes checking for memset... yes checking for mkdtemp... yes checking for nanosleep... yes checking for opendir... yes checking for putenv... yes checking for qsort... yes checking for readlink... yes checking for select... yes checking for setenv... yes checking for getpgid... yes checking for setpgid... yes checking for setsid... yes checking for sigaltstack... yes checking for sigstack... yes checking for sigset... yes checking for sigsetjmp... no checking for sigaction... yes checking for sigprocmask... yes checking for sigvec... no checking for strcasecmp... yes checking for strerror... yes checking for strftime... yes checking for stricmp... no checking for strncasecmp... yes checking for strnicmp... no checking for strpbrk... yes checking for strtol... yes checking for tgetent... yes checking for towlower... yes checking for towupper... yes checking for iswupper... yes checking for usleep... yes checking for utime... yes checking for utimes... yes checking for mblen... yes checking for ftruncate... yes checking for unsetenv... yes checking for _LARGEFILE_SOURCE value needed for large files... no checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking for st_blksize... yes checking whether stat() ignores a trailing slash... no checking for iconv_open()... yes checking for nl_langinfo(CODESET)... yes checking for strtod in -lm... yes checking for strtod() and other floating point functions... yes checking for isinf()... yes checking for isnan()... yes checking --disable-acl argument... no checking for acl_get_file in -lposix1e... no checking for acl_get_file in -lacl... no checking for POSIX ACL support... no checking for acl_get in -lsec... no checking for Solaris ACL support... no checking for AIX ACL support... no checking for pango_shape_full... yes checking --disable-gpm argument... no checking for gpm... no checking --disable-sysmouse argument... no checking for sysmouse... no checking for FD_CLOEXEC... yes checking for rename... yes checking for sysctl... not usable checking for sysinfo... yes checking for sysinfo.mem_unit... yes checking for sysconf... yes checking size of int... 4 checking size of long... 8 checking size of time_t... 8 checking size of off_t... 8 checking uint32_t is 32 bits... ok checking whether memmove handles overlaps... yes checking whether X_LOCALE needed... no checking whether Xutf8SetWMProperties() can be used... yes checking for _xpg4_setrunelocale in -lxpg4... no checking how to create tags... ctags checking how to run man with a section nr... man -s checking --disable-nls argument... no checking for msgfmt... msgfmt checking for NLS... gettext() works checking for bind_textdomain_codeset... yes checking for _nl_msg_cat_cntr... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for dlopen()... no checking for dlopen() in -ldl... yes checking for dlsym()... yes checking setjmp.h usability... yes checking setjmp.h presence... yes checking for setjmp.h... yes checking for GCC 3 or later... yes checking whether we need -D_FORTIFY_SOURCE=1... yes checking whether we need to force -D_FILE_OFFSET_BITS=64... no checking linker --as-needed support... yes configure: updating cache auto/config.cache configure: creating auto/config.status config.status: creating auto/config.mk config.status: creating auto/config.h
wasabi1073js

2018/06/04 13:38

コメントが長くなってしまい、誠に申し訳ありません。 本文では文字数制限にひっかかってしまったので、 コメントに追記いたしました。 どなたか、おわかりになられる方、いらっしゃいましたら、 返信いただけますと幸いです。 よろしくお願いいたします。
mkgrei

2018/06/04 21:28

--enable-python3interp vi_cv_path_python3=/usr/bin/python3.4 \ --with-python3-config-dir=/usr/bin/python3.5/config-3.5m-x86_64-linux-gnu \ 設定の際に3.4と3.5が混じっていますが、正しいのでしょうか? Logの方では、 checking Python version... auto/configure: line 6638: /usr/bin/python3.4: No such file or directory checking Python is 3.0 or better... auto/configure: line 6645: /usr/bin/python3.4: No such file or directory too old のようにpython3.4に対してエラーになっています。
wasabi1073js

2018/06/10 05:43

ご指摘いただき、ありがとうございます。 しかし該当箇所を3.5と入力してから実行をしましたが、 結果的にpython3が有効になることはありませんでした。 現在こちらの作業に時間がとれなくなっているため、 後日、ログを確認してみようと思います。 重要な情報があれば、改めてこちらに記載いたします。 みなさま、ご協力ありがとうございます。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問