Macbook Air で OSX Yosemite を実行しています。python3 とアップル開発者パッケージがインストールされています。matplotlib を含め、既にインストールしたモジュールと同様のモジュールをインストールしようとしています。基本的に、SciPy、Ginga、AstroPy、iPython などの科学的な python パッケージをインストールしようとすると、pip のインストールを試みた後にターミナルに次のように表示されます。
-bash: pip: command not found
そのため、提供されている場合は tarball をダウンロードしようとし、Web サイトと README ファイルに従ってその方法でインストールするための指示に従いますが、それでもエラーが発生します。たとえば、この astropy tarball では、ディレクトリから python setup.py install を実行するように指定されており、次のようになります。
jesses-Air:astropy-1.0 jessehanowell$ python setup.py install
running install
Checking .pth file support in /Library/Python/2.7/site-packages/
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-
install-632.pth'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/Library/Python/2.7/site-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
https://pythonhosted.org/setuptools/easy_install.html
Please make the appropriate changes for your system and try again.
「python3 setup.py install」コマンドでも同じことが言えます。python3 がインストールされていて、Yosemite はまだ python v2.4.7 で実行されており、ファイルが置かれているダウンロード ディレクトリからターミナルを実行していることに注意してください。ファイルを解凍したファイルを新しい場所に変更する必要があるのでしょうか? しかし、これらのパッケージの使い方を本当に学びたいので、基本的にはがっかりしています。私の友人がmatplotlibをインストールできたかどうか、私はこれらをインストールできるはずだと知っています。
それで、pipを私のコンピューターに復元してその方法でインストールする方法はありますか? または、誰かが私が間違ってやっている明らかなことを指摘できますか? 助けてくれてありがとう!