
一起从0开始python
文章平均质量分 71
3TV
很容易忘记做过的东西,那就记下来吧
展开
-
conda 安装太慢
有时候conda好慢,怎么办呢?老办法,切换源1、conda config --show将会显示conda的配置信息,找到channel, 对应的就是我们的镜像配置channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ - defaults2、添加清华大学的镜像conda co原创 2020-09-08 19:04:37 · 10120 阅读 · 0 评论 -
python爬图
首先,使用的是beautifulsoup这是python自带的标准库关于beautifulsoup具体的,可以查看1、https://beautifulsoup.readthedocs.io/zh_CN/latest/2、https://cuiqingcai.com/1319.html完整代码如下:import urllib.requestfrom bs4 import BeautifulSoupimport osdef Download(url, picAlt, name)原创 2020-08-29 17:01:45 · 482 阅读 · 0 评论 -
The NVIDIA driver on your system is too old
其他方法你都试了,可以尝试https://pytorch.org/get-started/locally/找到自己对应的版本和重新安装pip install torch==1.5.1+cu101 torchvision==0.6.1+cu101 -f https://download.pytorch.org/whl/torch_stable.html原创 2020-07-01 15:34:35 · 937 阅读 · 0 评论 -
pip/pip3 install XXXX.whl失败
解决方法1: 点此查看如果方法一正确,那么可以利用方法2排查解决方法2:点此查看原创 2020-07-01 11:23:19 · 5053 阅读 · 0 评论 -
pip install下载速度太慢
使用pip install的时候我们经常发现下载的速度很慢,因为我们下载python库所使用的原地址是国外的,所以下载速度非常慢,有时还会因为下载超时而失败(经常失败,特别是网速不好的时候)那么有没有一个更为简洁的方法去加快安装python库的速度呢?答案是有的平时最常用的方法是使用使用其他的源来加快下载速度:阿里云:http://mirrors.aliyun.com/pypi/simple 清华:https://pypi.tuna.tsinghua.edu.cn/simple豆瓣:..原创 2020-05-13 10:31:33 · 16965 阅读 · 5 评论 -
PackagesNotFoundError: The following packages are not available from current channels
因为要用到lifelines 包,在cmd中使用conda install lifelines ,显示如下错误:PackagesNotFoundError: The following packages are not available from current channels:- lifelinesCurrent channels:- https://conda.anaconda.org/derickl/win-64- https://conda.anaconda.org/derick原创 2020-05-13 10:17:05 · 722 阅读 · 1 评论 -
用conda创建python虚拟环境
1、首先在所在系统中安装Anaconda可以打开命令行输入conda -V检验是否安装以及当前conda的版本。2、conda常用的命令 1)conda list 查看安装了哪些包。 2)conda env list 或 conda info -e 查看当前存在哪些虚拟环境 3)conda update conda 检查更新当前conda3、创建python虚拟环境 conda create -n your_env_name python=X.X(2.7、3....原创 2020-05-11 17:32:59 · 719 阅读 · 0 评论 -
‘pip._internal‘ has no attribute ‘pep425tags‘.(.whl is not a supported wheel on this platform)
出现这个错误的原因是Python本地的版本与下载的安装包的版本不匹配比如,安装包支持的是cp26而查看你的本地支持的版本是python3.7.对应Python支持的安装包版本查看如下:第一种解决方法import pip._internal然后print(pip._internal.pep425tags.get_supported())如果还是报错,尝试第二种方法pip._internal.pep425tags然后print(pip._internal.pep4原创 2020-05-11 16:29:20 · 1044 阅读 · 0 评论 -
python 随笔(pip pip3 conda及一些问题解决方式)
一、查看pyhton版本python2 --versionpython3 --version二、环境激活1、conda中激活环境conda activate ******2、conda退出当前环境 conda deactivate三、pip 和 pip31、pip是python的包管理工具,pip和pip3版本不同,都位于Scripts\目录下2、如果系统中只安装了Python2,那么就只能使用pip3、如果系统中只安装了Python3,那么既可以使用pip..原创 2020-05-11 17:22:51 · 1090 阅读 · 0 评论