cygwinでnumpyがインポートできなくて困っています。
下にインストールしたときの手順をいいます。
gnupackを以下のサイトでダウンロードしました。
gnupack pretest 2018.06.10 をインストールしました。
https://ja.osdn.net/projects/gnupack/
そのあと、cygwinと実行し、apt-cyg install libgif7のコマンドを実行しました。
# Host: (パソコン名なので伏せておきます) | User: public_user | Time: 2018-12-25 14:09:31 # Path: /desktop # # cd ✔ Success (retv = 0) # Host: (パソコン名なので伏せておきます) | User: public_user | Time: 2018-12-25 14:09:38 # Path: ~ # # apt-cyg install libgif7 Warning: /etc/setup/installed.db version is less than 3. Before continuing, recommend to execute below command: apt-cyg dist-upgrade Do you continue? [y/N] y continue Cache directory is /setup Mirror is http://ftp.jaist.ac.jp/pub/cygwin chmod: '/setup/.apt-cyg' のパーミッションを変更しています: Invalid argument Error: cannot initialize directory /setup/.apt-cyg ✗ Failure (retv = 1) # Host: (パソコン名なので伏せておきます) | User: public_user | Time: 2018-12-25 14:10:37 # Path: ~ # # apt-cyg install libgif7 Warning: /etc/setup/installed.db version is less than 3. Before continuing, recommend to execute below command: apt-cyg dist-upgrade Do you continue? [y/N] y continue Cache directory is /setup Mirror is http://ftp.jaist.ac.jp/pub/cygwin /tmp/tmp.TDjSGA9YTO 100%[===================>] 1.29K --.-KB/s 時間 0.05s 2018-12-25 14:10:56 URL:https://cygwin.com/key/pubring.asc [1324/1324] -> "/tmp/tmp.TDjSGA9YTO" [1] TRUSTEDKEY_CYGWIN: OK gpg: *警告*: homedir 「/setup/.apt-cyg」の安全でない許可 gpg: *警告*: セキュアでないメモリーを使用しています! gpg: 詳細はhttp://www.gnupg.org/documentation/faq.htmlをご覧ください gpg: 鍵リング「/setup/.apt-cyg/secring.gpg」ができました gpg: WARNING: unable to restore permissions to `/setup/.apt-cyg/pubring.gpg': Invalid argumentgpg: 鍵676041BA: 公開鍵"Cygwin <cygwin@cygwin.com>"をインポートしました gpg: 処理数の合計: 1 gpg: インポート: 1 /tmp/tmp.TDjSGA9YTO 100%[===================>] 1.66K --.-KB/s 時間 0s 2018-12-25 14:10:58 URL:http://cygwinports.org/ports.gpg [1702/1702] -> "/tmp/tmp.TDjSGA9YTO" [1] TRUSTEDKEY_CYGWINPORTS: OK gpg: *警告*: homedir 「/setup/.apt-cyg」の安全でない許可 gpg: *警告*: セキュアでないメモリーを使用しています! gpg: 詳細はhttp://www.gnupg.org/documentation/faq.htmlをご覧ください gpg: WARNING: unable to restore permissions to `/setup/.apt-cyg/pubring.gpg': Invalid argumentgpg: 鍵66EE1F94: 公開鍵"Yaakov Selkowitz (Cygwin Ports) <yselkowitz@users.sourceforge.net>"をインポートしました gpg: 処理数の合計: 1 gpg: インポート: 1 Updating setup.ini setup.bz2 100%[===================>] 3.60M 9.64MB/s 時間 0.4s 2018-12-25 14:11:00 URL:http://ftp.jaist.ac.jp/pub/cygwin/x86/setup.bz2 [3770605/3770605] -> "setup.bz2" [1] setup.bz2.sig 100%[===================>] 72 --.-KB/s 時間 0s 2018-12-25 14:11:00 URL:http://ftp.jaist.ac.jp/pub/cygwin/x86/setup.bz2.sig [72/72] -> "setup.bz2.sig" [1] signature verified: setup.bz2.sig bunzip2: I/O or other error, bailing out. Possible reason follows. bunzip2: Invalid argument Input file = setup.bz2, output file = setup bunzip2: Deleting output file setup, if it exists. setup.ini 100%[===================>] 14.71M 5.47MB/s 時間 2.7s 2018-12-25 14:11:04 URL:http://ftp.jaist.ac.jp/pub/cygwin/x86/setup.ini [15421978/15421978] -> "setup.ini" [1] setup.ini.sig 100%[===================>] 72 --.-KB/s 時間 0s 2018-12-25 14:11:04 URL:http://ftp.jaist.ac.jp/pub/cygwin/x86/setup.ini.sig [72/72] -> "setup.ini.sig" [1] signature verified: setup.ini.sig Updated setup.ini Installing libgif7 Found package libgif7 libgif7-5.1.4-1.tar 100%[===================>] 14.64K --.-KB/s 時間 0.002s 2018-12-25 14:11:05 URL:http://ftp.jaist.ac.jp/pub/cygwin/x86/release/giflib/libgif7/libgif7-5.1.4-1.tar.xz [14992/14992] -> "libgif7-5.1.4-1.tar.xz" [1] hash_check: sha512sum: libgif7-5.1.4-1.tar.xz: OK Unpacking... gzip: /etc/setup/libgif7.lst.gz: Invalid argument Package libgif7 requires the following packages, installing: cygwin Package cygwin is already installed, skipping Running postinstall scripts Warning: Schema “org.gnome.system.locale” has path “/system/locale/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated. Warning: Schema “org.gnome.system.proxy” has path “/system/proxy/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated. Warning: Schema “org.gnome.system.proxy.http” has path “/system/proxy/http/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated. Warning: Schema “org.gnome.system.proxy.https” has path “/system/proxy/https/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated. Warning: Schema “org.gnome.system.proxy.ftp” has path “/system/proxy/ftp/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated. Warning: Schema “org.gnome.system.proxy.socks” has path “/system/proxy/socks/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated. Warning: Schema “org.gnome.system.locale” has path “/system/locale/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated. Warning: Schema “org.gnome.system.proxy” has path “/system/proxy/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated. Warning: Schema “org.gnome.system.proxy.http” has path “/system/proxy/http/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated. Warning: Schema “org.gnome.system.proxy.https” has path “/system/proxy/https/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated. Warning: Schema “org.gnome.system.proxy.ftp” has path “/system/proxy/ftp/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated. Warning: Schema “org.gnome.system.proxy.socks” has path “/system/proxy/socks/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated. Warning: Schema “org.gnome.system.locale” has path “/system/locale/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated. Warning: Schema “org.gnome.system.proxy” has path “/system/proxy/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated. Warning: Schema “org.gnome.system.proxy.http” has path “/system/proxy/http/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated. Warning: Schema “org.gnome.system.proxy.https” has path “/system/proxy/https/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated. Warning: Schema “org.gnome.system.proxy.ftp” has path “/system/proxy/ftp/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated. Warning: Schema “org.gnome.system.proxy.socks” has path “/system/proxy/socks/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated. Warning: Schema “org.gnome.system.locale” has path “/system/locale/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated. (Warning: Schema “org.gnome.system.locale” has path “/system/locale/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.と類似したエラーメッセージが何回も現れました。) Package libgif7 installed ✔ Success (retv = 0) # Host: (パソコン名なので伏せておきます) | User: public_user | Time: 2018-12-25 14:11:32 # Path: ~ # # cd - /desktop ✔ Success (retv = 0) # Host: (パソコン名なので伏せておきます) | User: public_user | Time: 2018-12-25 14:11:47 # Path: /desktop # # cd
その次に
cdと打ち込み、apt-cyg install python2-numpy
Do you continue?をy
何回やっても以下のエラーが出てきました。
Warning: /etc/setup/installed.db version is less than 3. Before continuing, recommend to execute below command: apt-cyg dist-upgrade Do you continue? [y/N] N
ここでyと入力しました。
すると次のようになりました。
abort Warning: some required packages did not install, continuing Package liblapack0 installed Package python2 is already installed, skipping Package python2-setuptools is already installed, skipping Package python2-numpy installed ✔ Success (retv = 0)
その後cygwinでpythonを実行しました。
# Host: (ここはパソコン名なので伏せておきます) | User: public_user | Time: 2018-12-25 14:19:22 # Path: /c # # cd ✔ Success (retv = 0) # Host:(ここはパソコン名なので伏せておきます) | User: public_user | Time: 2018-12-25 14:19:26 # Path: ~ # # python Python 2.7.14 (default, Oct 31 2017, 21:15:21) [GCC 6.4.0] on cygwin Type "help", "copyright", "credits" or "license" for more information. >>> import numpy Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/site-packages/numpy/__init__.py", line 142, in <module> from . import add_newdocs File "/usr/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module> from numpy.lib import add_newdoc File "/usr/lib/python2.7/site-packages/numpy/lib/__init__.py", line 8, in <module> from .type_check import * File "/usr/lib/python2.7/site-packages/numpy/lib/type_check.py", line 11, in <module> import numpy.core.numeric as _nx File "/usr/lib/python2.7/site-packages/numpy/core/__init__.py", line 14, in <module> from . import multiarray ImportError: No such file or directory
また、gnupack-pretest_devel-2018.06.10\home以下の
.bashrcのファイルの最後の行に
PATH=/usr/lib/lapack:$PATHと書き込みました。
あるテキストに沿ってインストールしたのですが、
numpyがインポートできなくて困っています。
解決方法を教えてくださいませんか。
#追記
追記の続きは回答者の欄にかいてあります。