GNU/Linux >> Belajar Linux >  >> Ubuntu

Instal Pip Memberikan "perintah" python Setup.py Egg_info "Gagal Dengan Kode Kesalahan 1"?

Saya mencoba menginstal paket python rpy2 dengan pip install di Ubuntu 16.04:

pip install rpy2==2.2.7

tetapi dapatkan pesan kesalahan (lihat output lengkap di bawah):

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-EuOI6K/unroll/

Hal yang sama terjadi dengan paket lain, seperti pip install unroll , atau menggunakan pip2 . Saya pikir posting ini adalah masalah yang sama, tetapi itu diselesaikan dengan menggunakan sudo.

Solusi telah dicoba

Saya mencoba solusi dalam posting ini, seperti:pip install --upgrade setuptools , (sudo) easy_install -U setuptools , atau sudo apt-get install python-setuptools , tetapi tidak berhasil.

info python/pip

Seseorang menyarankan saya mungkin memiliki instalasi python/pip yang aneh, berikut adalah beberapa info:

sudo which python pip pip2 | xargs -rd 'n' readlink -f 
/usr/bin/python2.7   
/usr/local/bin/pip  
/usr/local/bin/pip2  

sudo python --version   
Python 2.7.12  

sudo pip --version  
pip 9.0.1 from /home/matifou/.local/lib/python2.7/site-packages (python 2.7)  
/usr/bin/pip2 --version  
pip 8.1.1 from /usr/lib/python2.7/dist-packages (python 2.7)

ls -l $(which pip); dpkg -S /usr/bin/pip
-rwxr-xr-x 1 root root 204 Nov  8 16:24 /usr/local/bin/pip
python-pip: /usr/bin/pip

Keluaran kesalahan penuh

pip install rpy2==2.2.7  
Collecting rpy2==2.2.7   Using cached rpy2-2.2.7.tar.gz  
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/rpy2.egg-info
    writing pip-egg-info/rpy2.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/rpy2.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/rpy2.egg-info/dependency_links.txt
    writing manifest file 'pip-egg-info/rpy2.egg-info/SOURCES.txt'
    Traceback (most recent call last):
      File "", line 1, in 
      File "/tmp/pip-build-EkrbmM/rpy2/setup.py", line 462, in 
        [os.path.join('doc', 'source', 'rpy2_logo.png')])],
      File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/local/lib/python2.7/dist-packages/setuptools/command/egg_info.py",
line 280, in run
        self.find_sources()
      File "/usr/local/lib/python2.7/dist-packages/setuptools/command/egg_info.py",
line 295, in find_sources
        mm.run()
      File "/usr/local/lib/python2.7/dist-packages/setuptools/command/egg_info.py",
line 526, in run
        self.add_defaults()
      File "/usr/local/lib/python2.7/dist-packages/setuptools/command/egg_info.py",
line 562, in add_defaults
        sdist.add_defaults(self)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/command/py36compat.py",
line 36, in add_defaults
        self._add_defaults_ext()
      File "/usr/local/lib/python2.7/dist-packages/setuptools/command/py36compat.py",
line 119, in _add_defaults_ext
        build_ext = self.get_finalized_command('build_ext')
      File "/usr/lib/python2.7/distutils/cmd.py", line 312, in get_finalized_command
        cmd_obj.ensure_finalized()
      File "/usr/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
        self.finalize_options()
      File "/tmp/pip-build-EkrbmM/rpy2/setup.py", line 155, in finalize_options
        config += get_rconfig(r_home, about)
      File "/tmp/pip-build-EkrbmM/rpy2/setup.py", line 319, in get_rconfig
        rc = RConfig.from_string(rconfig, allow_empty = allow_empty)
      File "/tmp/pip-build-EkrbmM/rpy2/setup.py", line 279, in from_string
        + 'nin stringn' + string)
    ValueError: Invalid substring
    -fopenmp
    in string
    -Wl,--export-dynamic -fopenmp -Wl,-Bsymbolic-functions -Wl,-z,relro -L/usr/lib/R/lib -lR -lpcre -llzma -lbz2 -lz -lrt -ldl -lm

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-EkrbmM/rpy2/

pip install unroll
Collecting unroll   Using cached unroll-0.1.0.tar.gz
    Complete output from command python setup.py egg_info:
    Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz
    Traceback (most recent call last):
      File "", line 1, in 
      File "/tmp/pip-build-QimGjp/unroll/setup.py", line 2, in 
        ez_setup.use_setuptools()
      File "/usr/local/lib/python2.7/dist-packages/ez_setup.py", line 145, in use_setuptools
        return _do_download(version, download_base, to_dir, download_delay)
      File "/usr/local/lib/python2.7/dist-packages/ez_setup.py", line 124, in _do_download
        to_dir, download_delay)
      File "/usr/local/lib/python2.7/dist-packages/ez_setup.py", line 193, in download_setuptools
        src = urlopen(url)
      File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
        return opener.open(url, data, timeout)
      File "/usr/lib/python2.7/urllib2.py", line 435, in open
        response = meth(req, response)
      File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
        'http', request, response, code, msg, hdrs)
      File "/usr/lib/python2.7/urllib2.py", line 473, in error
        return self._call_chain(*args)
      File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
        result = func(*args)
      File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
        raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
    urllib2.HTTPError: HTTP Error 403: SSL is required

Command "python setup.py egg_info" failed with error code 1 in tmp/pip-
build-QimGjp/unroll/

Jawaban yang Diterima:

Tingkatkan setuptools menggunakan pip

Versi python-setuptools dalam repositori paket Ubuntu 16.04 LTS kedaluwarsa/tidak terawat. Tingkatkan dengan pip daripada mengandalkan pengelola paket:

$ sudo pip install --upgrade setuptools

Ubuntu
  1. Cara Menginstal File deb di Ubuntu (dengan Contoh)

  2. Selalu Mendapatkan Kesalahan 403 Dengan Phpmyadmin?

  3. File .desktop. Ada Kesalahan Meluncurkan Aplikasi?

  1. Cara Memperbaiki Kesalahan – ModSecurity:Akses ditolak dengan kode 44 [Apache]

  2. error:perintah 'gcc' gagal dengan status keluar 1 di CentOS

  3. Kesalahan menginstal gnureadline melalui pip

  1. Instal Oniguruma di mesin PPC64LE dengan CentOS

  2. Kesalahan Dalam Menginstal Penambahan Tamu Virtualbox Iso File Mount?

  3. Kesalahan Lokal Dengan Instal Apt-get?