পাইপ ব্যবহার করে ভার্চুয়ালেনভে স্কেরাপি ইনস্টল করার সময় ত্রুটি


47
pip install scrapy
Downloading/unpacking scrapy
  Downloading Scrapy-0.24.2-py2-none-any.whl (502kB): 502kB downloaded
Downloading/unpacking pyOpenSSL (from scrapy)
  Downloading pyOpenSSL-0.14.tar.gz (128kB): 128kB downloaded
  Running setup.py (path:/home/elie/.virtualenvs/stat/build/pyOpenSSL/setup.py) egg_info for package pyOpenSSL

    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    no previously-included directories found matching 'doc/_build'
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in /home/elie/.virtualenvs/stat/lib/python2.7/site-packages (from scrapy)
Downloading/unpacking queuelib (from scrapy)
  Downloading queuelib-1.1.1.tar.gz
  Running setup.py (path:/home/elie/.virtualenvs/stat/build/queuelib/setup.py) egg_info for package queuelib

Requirement already satisfied (use --upgrade to upgrade): lxml in /home/elie/.virtualenvs/stat/lib/python2.7/site-packages (from scrapy)
Downloading/unpacking w3lib>=1.2 (from scrapy)
  Downloading w3lib-1.6.tar.gz
  Running setup.py (path:/home/elie/.virtualenvs/stat/build/w3lib/setup.py) egg_info for package w3lib

Requirement already satisfied (use --upgrade to upgrade): cssselect>=0.9 in /home/elie/.virtualenvs/stat/lib/python2.7/site-packages (from scrapy)
Downloading/unpacking Twisted>=10.0.0 (from scrapy)
  Downloading Twisted-14.0.0.tar.bz2 (4.3MB): 4.3MB downloaded
  Running setup.py (path:/home/elie/.virtualenvs/stat/build/Twisted/setup.py) egg_info for package Twisted

Downloading/unpacking cryptography>=0.2.1 (from pyOpenSSL->scrapy)
  Downloading cryptography-0.5.2.tar.gz (319kB): 319kB downloaded
  Running setup.py (path:/home/elie/.virtualenvs/stat/build/cryptography/setup.py) egg_info for package cryptography
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    c/_cffi_backend.c:13:17: fatal error: ffi.h: No such file or directory
     #include <ffi.h>
                     ^
    compilation terminated.
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/home/elie/.virtualenvs/stat/build/cryptography/setup.py", line 174, in <module>
        "test": PyTest,
      File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
        _setup_distribution = dist = klass(attrs)
      File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/setuptools/dist.py", line 239, in __init__
        self.fetch_build_eggs(attrs.pop('setup_requires'))
      File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/setuptools/dist.py", line 263, in fetch_build_eggs
        parse_requirements(requires), installer=self.fetch_build_egg
      File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/pkg_resources.py", line 564, in resolve
        dist = best[req.key] = env.best_match(req, self, installer)
      File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/pkg_resources.py", line 802, in best_match
        return self.obtain(req, installer) # try and download/install
      File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/pkg_resources.py", line 814, in obtain
        return installer(requirement)
      File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/setuptools/dist.py", line 313, in fetch_build_egg
        return cmd.easy_install(req)
      File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 593, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 623, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 809, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1015, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1003, in run_setup
        raise DistutilsError("Setup script exited with %s" % (v.args[0],))
    distutils.errors.DistutilsError: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    Complete output from command python setup.py egg_info:
    Package libffi was not found in the pkg-config search path.

Perhaps you should add the directory containing `libffi.pc'

to the PKG_CONFIG_PATH environment variable

No package 'libffi' found

Package libffi was not found in the pkg-config search path.

Perhaps you should add the directory containing `libffi.pc'

to the PKG_CONFIG_PATH environment variable

No package 'libffi' found

Package libffi was not found in the pkg-config search path.

Perhaps you should add the directory containing `libffi.pc'

to the PKG_CONFIG_PATH environment variable

No package 'libffi' found

Package libffi was not found in the pkg-config search path.

Perhaps you should add the directory containing `libffi.pc'

to the PKG_CONFIG_PATH environment variable

No package 'libffi' found

Package libffi was not found in the pkg-config search path.

Perhaps you should add the directory containing `libffi.pc'

to the PKG_CONFIG_PATH environment variable

No package 'libffi' found

c/_cffi_backend.c:13:17: fatal error: ffi.h: No such file or directory

 #include <ffi.h>

                 ^

compilation terminated.

Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/home/elie/.virtualenvs/stat/build/cryptography/setup.py", line 174, in <module>

    "test": PyTest,

  File "/usr/lib/python2.7/distutils/core.py", line 111, in setup

    _setup_distribution = dist = klass(attrs)

  File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/setuptools/dist.py", line 239, in __init__

    self.fetch_build_eggs(attrs.pop('setup_requires'))

  File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/setuptools/dist.py", line 263, in fetch_build_eggs

    parse_requirements(requires), installer=self.fetch_build_egg

  File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/pkg_resources.py", line 564, in resolve

    dist = best[req.key] = env.best_match(req, self, installer)

  File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/pkg_resources.py", line 802, in best_match

    return self.obtain(req, installer) # try and download/install

  File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/pkg_resources.py", line 814, in obtain

    return installer(requirement)

  File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/setuptools/dist.py", line 313, in fetch_build_egg

    return cmd.easy_install(req)

  File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 593, in easy_install

    return self.install_item(spec, dist.location, tmpdir, deps)

  File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 623, in install_item

    dists = self.install_eggs(spec, download, tmpdir)

  File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 809, in install_eggs

    return self.build_and_install(setup_script, setup_base)

  File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1015, in build_and_install

    self.run_setup(setup_script, setup_base, args)

  File "/home/elie/.virtualenvs/stat/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1003, in run_setup

    raise DistutilsError("Setup script exited with %s" % (v.args[0],))

distutils.errors.DistutilsError: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /home/elie/.virtualenvs/stat/build/cryptography
Storing debug log for failure in /home/elie/.pip/pip.log

আমি আগে স্কেরাপি ইনস্টল করতাম, কখনও সমস্যা ছিল না, কী সমস্যা?


@hbdgaf আমার অর্থ আমি এখনই এটি ইনস্টল করেছি এবং আমার আর একটি সমস্যা পেয়েছে
— লাইনব

@hbdgaf এখানে নতুন ত্রুটি পেস্টবিন.
— com

@ এইচবিডিগাফ এটি করেছে, এবং এটি ঠিক করেছে, আপনি যা বলেছিলেন ঠিক Separate question then. Or you could try chat.তেমনই আমি বলেছিলাম যে ত্রুটিটি দেখানো উচিত, আপনি কী জানেন, কিছুই নয়
— লিনোব

@hbdgaf ঠিক আছে পরের বার, আমি যদি সেখানে চ্যাট রুমগুলির জন্য সত্যই ব্যবহার না করে থাকি তবে আমি এই জাতীয় প্রশ্ন জিজ্ঞাসা করব
— লিনোব

@hbdgaf এগুলি পোড়াতে দেয়, আমি প্রশ্নটি মুছে ফেলতে চেয়েছিলাম তবে আমি যে ব্যবহারকারী তার
— উত্তরটি

উত্তর:


83

আমিও এই ত্রুটি পেয়েছি। সমস্যা হল

 No package 'libffi' found
 c/_cffi_backend.c:13:17: fatal error: ffi.h: No such file or directory
 #include <ffi.h>

আপনার এটি করা উচিত:

sudo apt-get install libffi-dev

11
এটি চেষ্টা করেছিলাম এবং আমাকেও libssl-dev ইনস্টল করতে হয়েছিল
— লাইনব

চেষ্টা করার সময় আমি এই সমস্যাটি পেয়েছি pip3 install cairocffi। এটি সমাধান করেছে। ধন্যবাদ!
— মার্টিন থোমা

2
অ্যামাজন লিনাক্স:sudo yum install libffi-devel
— জন রোটেনস্টেইন

12

14.04-র নতুন ইনস্টলেশন থেকে আমাকে পাইথন-দেব, লিব্ফি-ডেভ, লিবস্লল-ডেভ, লিবক্সএমএল 2-দেব, এবং লিবক্সস্লট 1-দেব প্যাকেজ ইনস্টল করতে হয়েছিল। এগুলি ইনস্টল হয়ে গেলে, ভাল pip install scrapyকাজ করে।

sudo apt-get install python-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev
pip install scrapy

আমি এই ত্রুটির মুখোমুখি: `---------------------------------------- আদেশ" / usr / বিন / পাইথন -u -c "আমদানি সেটআপটুলস, টোকেনাইজ; __ ফাইল __ = '/ tmp / পিপ-বিল্ড -0R1XKL / lxML / setup.py'; এক্সিকিউট (সংকলন (getattr (টোকেনাইজ, 'ওপেন', ওপেন)) ( ফাইল ) .read ()। ('\ r \ n', '\ n'), ফাইল , 'exec')) "ইনস্টল করুন --record /tmp/pip-T9Uhnd-record/install-record.txt --single- --compile "সংস্করণ-বাইরে-পরিচালিত / tmp / 'পিপ-বিল্ড-0R1XKL / lxml /` মধ্যে ত্রুটি কোড 1 ব্যর্থ
— দো Như গান Vy

এটি আমার সম্পূর্ণ লগ: gist.github.com/donhuvy/1cc55b4ed6a5c8a6e458fce62c51e337 আমি CentOS 7 - x64 এ স্কেরাপি ইনস্টল করার চেষ্টা করব
— Nhu Vy

0

নিম্নলিখিত দুটি কমান্ড ব্যবহার করে আমি স্কেরাপি ইনস্টল করেছি:

sudo apt-get install python-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev

sudo apt-get install python-scrapy

দ্বারা স্কেরাপির সংস্করণটি পরীক্ষা করে দেখুন,

scrapy -V
আমাদের সাইট ব্যবহার করে, আপনি স্বীকার করেছেন যে আপনি আমাদের কুকি নীতি এবং গোপনীয়তা নীতিটি পড়েছেন এবং বুঝতে পেরেছেন ।
Licensed under cc by-sa 3.0 with attribution required.