Anaconda3 安装scrapy出现UnsatisfiableSpecifications解决方案

本文分享了在Anaconda环境下安装Scrapy的多种尝试及最终解决方案。作者详细记录了使用Anaconda Navigator和conda命令安装失败的经历,最终通过pip命令成功安装,并解决了依赖问题。文章还提到了添加清华镜像源以避免HTTP错误的方法。

前言:装东西真的看运气,有时候自己环境对了,一下子就装上去了。如果环境不对,各种意想不到的问题,百度的时候,还没有一个准确答案,全靠自己摸着石头过河,瞎搞,哈哈。

一.目标,anaconda安装scrapy

二.问题

我用了三种方式装scrapy,前2种都没成功,最后一种终于成功。可以直接看第三种方法。

    1.我先用的Anaconda Navigator安装scrapy,装不上去,报错。

 

    UnsatisfiableSpecifications error

    Cause

    Some conda package installation specifications are impossible to satisfy. For example, conda create -n tmp python=3 wxpython=3 produces an "Unsatisfiable Specifications" error because wxPython 3 depends on     Python 2.7, so the specification to install Python 3 conflicts with the specification to install wxPython 3.

    When an unsatisfiable request is made to conda, conda shows a message such as this one:

    The following specifications were found to be in conflict:     - python 3*     - wxpython 3* -> python 2.7*     Use "conda info <package>" to see the dependencies for each package. 

    This indicates that the specification to install wxpython 3 depends on installing Python 2.7, which conflicts with the specification to install python 3.

    

    对这个问题,百度了n久,并没有满意答案。

    2.cmd输入conda install scrapy报错

    输入之后,也报错。

    UnsatisfiableError: The following specifications were found to be in conflict:
    - conda[version='>=4.6.12']
    - scrapy
    Use "conda search <package> --info" to see the dependencies for each package.

    报错,未解决。

    3.cmd输入pip install scrapy成功

       步骤:1.先打开cmd,输入pip install scrapy

          2.但是会报错,报错信息如下:

          building 'twisted.test.raiser' extension
          error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
          3.http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted 下载twisted对应版本的whl文件,cp后面是python版本,amd64代表64位,
          运行命令:pip install C:\Users\Twisted-18.7.0-cp37-cp37m-win_amd64.whl       其中install后面为下载的whl文件的完整路径名

          4.安装完成后,再次运行:pip install Scrapy即可成功。

三、安装的时候最好添加清华镜像源,不然可能会报HTTP之类的错误。

    添加源的方法:1.在cmd下面输入 conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

              继续输入conda config --set show_channel_urls yes

             2.到C:\Users\11590目录下(1159是我的微软账户名),找到.condarc文件,删去default源。

              效果图:

四、Anaconda重装我也试过,直接装也会出问题。

    1.最好在系统设置里面,程序与软件选项中卸载

    

    2.重启后,删除C:\Users\11590目录下(1159是我的微软账户名)这个目录下,

    

 

     3.最好换个文件夹重装。

 

转载于:https://www.cnblogs.com/pmz-blog/p/11270351.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值