Anaconda问题集锦

问题一:conda install Python库时报PackagesNotFoundError:的错误的解决方案

方案一:

activate python-spider
anaconda search -t conda redis
anaconda show free/redis
conda install --channel https://conda.anaconda.org/free redis

方案二:

activate python-spider
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple redis

下载 MarkupSafe 报错 ImportError: cannot import name ‘Feature‘

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting MarkupSafe==1.0
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz (14 kB)
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\Administrator\Envs\monitor-backend\Scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-p3t1li0y\\markupsaf
e_358b1c9cb5494dbdb986e5b51dcb1d35\\setup.py'"'"'; __file__='"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-p3t1li0y\\markupsafe_358b1c9cb5494dbdb986e5b51dcb1d35\\setup.py'"'"';f=getattr(tokenize, '
"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\ADMINI~1\AppData\Local\Temp\pip-pip-egg-
info-47rt0qx6'
         cwd: C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-p3t1li0y\markupsafe_358b1c9cb5494dbdb986e5b51dcb1d35\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-p3t1li0y\markupsafe_358b1c9cb5494dbdb986e5b51dcb1d35\setup.py", line 6, in <module>
        from setuptools import setup, Extension, Feature
    ImportError: cannot import name 'Feature'
    ----------------------------------------
WARNING: Discarding https://pypi.tuna.tsinghua.edu.cn/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz#sha256=a6be69091dac236ea9c6bc7d012beab42010fa914c459791d62
7dad4910eb665 (from https://pypi.tuna.tsinghua.edu.cn/simple/markupsafe/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement MarkupSafe==1.0
ERROR: No matching distribution found for MarkupSafe==1.0

方案一:

activate python-spider
pip install --upgrade pip setuptools==45.2.0

Anaconda导入包

方案一:

activate python-spider
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
THE END
分享
二维码
打赏
< <上一篇
下一篇>>