2015-02-12 2 views
0

Я пытаюсь установить Rpy2 на mac Yosemite. Я прочитал все сообщения разных людей о том, как установить этот пакет. Никто не был полезен для меня, так как моя проблема специфичнаустановить Rpy2 на Mac получил ошибку

я первый сделал

sudo easy_install pip 

Тогда я сделал

pip install rpy2 

Но я получил что-то вроде

Collecting rpy2 
    Downloading rpy2-2.5.6.tar.gz (165kB) 
    100% |################################| 167kB 2.4MB/s 
    R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet" 
    /Library/Frameworks/R.framework/Resources/bin/R CMD config --ldflags 
    /Library/Frameworks/R.framework/Resources/bin/R CMD config --cppflags 
     Compilation parameters for rpy2's C components: 
      include_dirs = ['/Library/Frameworks/R.framework/Resources/include'] 
      library_dirs = [] 
      libraries  = ['lzma', 'z', 'icucore', 'm', 'iconv'] 
      extra_link_args = ['-F/Library/Frameworks/R.framework/..', '-framework', 'R'] 
    R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet" 
Collecting singledispatch (from rpy2) 
    Downloading singledispatch-3.4.0.3-py2.py3-none-any.whl 
Requirement already satisfied (use --upgrade to upgrade): six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from singledispatch->rpy2) 
Installing collected packages: singledispatch, rpy2 

    Exception: 
    Traceback (most recent call last): 
    File "/Library/Python/2.7/site-packages/pip-6.0.8-py2.7.egg/pip/basecommand.py", line 232, in main 
     status = self.run(options, args) 
    File "/Library/Python/2.7/site-packages/pip-6.0.8-py2.7.egg/pip/commands/install.py", line 347, in run 
     root=options.root_path, 
    File "/Library/Python/2.7/site-packages/pip-6.0.8-py2.7.egg/pip/req/req_set.py", line 549, in install 
     **kwargs 
    File "/Library/Python/2.7/site-packages/pip-6.0.8-py2.7.egg/pip/req/req_install.py", line 754, in install 
     self.move_wheel_files(self.source_dir, root=root) 
    File "/Library/Python/2.7/site-packages/pip-6.0.8-py2.7.egg/pip/req/req_install.py", line 963, in move_wheel_files 
     isolated=self.isolated, 
    File "/Library/Python/2.7/site-packages/pip-6.0.8-py2.7.egg/pip/wheel.py", line 234, in move_wheel_files 
     clobber(source, lib_dir, True) 
    File "/Library/Python/2.7/site-packages/pip-6.0.8-py2.7.egg/pip/wheel.py", line 212, in clobber 
     shutil.copyfile(srcfile, destfile) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile 
     with open(dst, 'wb') as fdst: 
    IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/singledispatch.py' 

Я попытался запустить с

easy_install rpy2 

Тогда я получил некоторые ошибки

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-1490.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. 

Finlly Я сделал это по-другому, и она работала, по-видимому

sudo easy_install rpy2 
+1

вам нужно изменить на суперпользователя, чтобы выполнить эту команду, попробуйте запустить «Суда -s», а затем вновь запустить команду –

ответ

0

Для проверки установленных пакетов использования:

1 - в оболочке Python/введите команду help('modules')

2 - Команда pip list

Выход будет похожи на:

бутылка (0.12.7) cffi (0.8.6) характеристика (14.1.0) криптография (0.6) cssselect (0.9.1) Джанго-mongodb- двигатель (0.5.2) djangotoolbox (1.6.2) folium (0.1.2) google-api-python-client (1.3.1) httplib2 (0.9) lxml (3.4.0) oauth2client (1.3.2) Шаблон (2.6) Подушка (2.6.0) pip (1.5.6) pyasn1 (0.1.7) pyasn1-modules (0.0.5) pycparser (2.10) pymongo (2.7.2) pyOpenSSL (0.14) queueib (1.2.2) запросы (2.4.3) rsa (3.1.4) Scrapy (0.24.4) scrapyd (1.0.1) селен (2.44.0) service-iden tity (14.0.0) setuptools (3.6) simplejson (3.6.5) six (1.8.0) Twisted (14.0.2) uritemplate (0.6) w3lib (1.10.0) wsgiref (0.1.2) zope.interface (4.1.1)

+0

Мой выход не нравится твое, это что-то вроде ниже >> > Справка ('модули') Пожалуйста, подождите минутку, пока я собираю список всех доступных модулей ... AVFoundation _Snd dircache PWD Accounts _TE Дис py2app AddressBook _Win Distutils py_compile –

+0

Я вставил вывод из пипса. один из модулей помощи намного больше и не так просто вставить здесь – aberna

+0

Несомненно, теперь я видел это, спасибо за этот комментарий! –

Смежные вопросы