python3 安装scrapy Exception: Traceback (most recent call last): File "/usr/lib/python3/dist-package...

错误代码:

Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 1006, in check_if_exists
    self.satisfied_by = pkg_resources.get_distribution(str(no_marker))
  File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 535, in get_distribution
    dist = get_provider(dist)
  File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 415, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 695, in find
    raise VersionConflict(dist, req)
pkg_resources.VersionConflict: (cryptography 1.2.3 (/usr/lib/python3/dist-packages), Requirement.parse('cryptography>=1.3'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 317, in run
    requirement_set.prepare_files(finder)
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 360, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 448, in _prepare_file
    req_to_install, finder)
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 387, in _check_skip_installed
    req_to_install.check_if_exists()
  File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 1011, in check_if_exists
    self.req.project_name
AttributeError: 'Requirement' object has no attribute 'project_name'

解决方法:安装全所需库文件即可:

sudo apt-get install build-essential
sudo apt-get install python3-dev
sudo apt-get install libxml2-de;
sudo apt-get install libxslt1-dev
sudo apt-get install libssl-dev
apt-get install -y libffi-dev
pip3 install Twisted
pip3 install w3lib
pip3 install lxm

 

转载于:https://www.cnblogs.com/INnoVationv2/p/5693702.html

ERROR: test_pt_common_predict (__main__.TestCommonExecutor) ---------------------------------------------------------------------- Traceback (most recent call last): File "d_warehouse/vot/z_test/z_model/cv/pt_common.py", line 54, in test_pt_common_predict Mnist(self.data_dir, man="gcgS467j").b("0001").run() File "/django_scrapy/d_warehouse/vot/base/base.py", line 357, in run return self.do_run() File "/django_scrapy/d_warehouse/vot/data/dataset/cv/mnist.py", line 34, in do_run train_df = self.sqlc.createDataFrame(train_data_list) File "/usr/local/lib/python3.8/dist-packages/pyspark/sql/context.py", line 473, in createDataFrame return self.sparkSession.createDataFrame( # type: ignore[call-overload] File "/usr/local/lib/python3.8/dist-packages/pyspark/sql/session.py", line 1222, in createDataFrame self._jvm.SparkSession.setActiveSession(self._jsparkSession) File "/usr/local/lib/python3.8/dist-packages/py4j/java_gateway.py", line 1712, in __getattr__ answer = self._gateway_client.send_command( File "/usr/local/lib/python3.8/dist-packages/py4j/java_gateway.py", line 1036, in send_command connection = self._get_connection() File "/usr/local/lib/python3.8/dist-packages/py4j/clientserver.py", line 284, in _get_connection connection = self._create_new_connection() File "/usr/local/lib/python3.8/dist-packages/py4j/clientserver.py", line 291, in _create_new_connection connection.connect_to_java_server() File "/usr/local/lib/python3.8/dist-packages/py4j/clientserver.py", line 438, in connect_to_java_server self.socket.connect((self.java_address, self.java_port)) ConnectionRefusedError: [Errno 111] Connection refused
07-14
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值