conda

Installing an old version of scikit-learn

喜你入骨 提交于 2020-08-27 22:03:59
问题 Problem Statment I'm trying to run some old python code that requires scikit-learn 18.0 but the current version I have installed is 0.22 and so I'm getting a warning/invalid data when I run the code. What I've Tried I tried installing the specific version both in the terminal: python -m pip install scikit-learn==0.18 and in conda and none of that has worked. All I can install is v 0.22 . Help? Thanks. Error In Terminal ERROR: Failed building wheel for scikit-learn Running setup.py clean for

Where does conda clean remove packages from?

北战南征 提交于 2020-08-22 08:09:16
问题 The conda documentation specifies: conda clean [-h] [-y] [--dry-run] [--json] [--debug] [--verbose] [-q] [-a] [-i] [-l] [-t] [-p] [-s] Remove unused packages and caches. Example: conda clean --tarballs (conda clean documentation) So it is supose to remove unused packages. where from ? from conda (base) ? from the active environment ? Does the environment need to be active? How does it know they are unused packages? 回答1: It removes unused packages from under the pkgs/ directory wherever you

Anaconda Python - how to reinstall NumPy

谁说我不能喝 提交于 2020-08-22 07:24:05
问题 I am using Anaconda 5.3.0's Python interpreter in Visual Studio Code. When I try to import sklearn I get an error: Traceback (most recent call last): File "c:\Users\azzam\machinelearning.py", line 1, in <module> import sklearn File "C:\Anaconda3\lib\site-packages\sklearn\__init__.py", line 134, in <module> from .base import clone File "C:\Anaconda3\lib\site-packages\sklearn\base.py", line 10, in <module> import numpy as np File "C:\Anaconda3\lib\site-packages\numpy\__init__.py", line 142, in

Anaconda Python - how to reinstall NumPy

北城余情 提交于 2020-08-22 07:23:00
问题 I am using Anaconda 5.3.0's Python interpreter in Visual Studio Code. When I try to import sklearn I get an error: Traceback (most recent call last): File "c:\Users\azzam\machinelearning.py", line 1, in <module> import sklearn File "C:\Anaconda3\lib\site-packages\sklearn\__init__.py", line 134, in <module> from .base import clone File "C:\Anaconda3\lib\site-packages\sklearn\base.py", line 10, in <module> import numpy as np File "C:\Anaconda3\lib\site-packages\numpy\__init__.py", line 142, in

python 虚拟环境总结

元气小坏坏 提交于 2020-08-19 16:26:01
每个项目依赖不同的第三方包,多个项目依赖的包的版本又不一样相同,为了方便管理项目的依赖,为每个项目单独创建一个虚拟独立的环境,各环境之间模块/代码互不影响,部署时则可以将该环境整体打包部署. (好像安装不同版本时不是在这个环境中单独安装,而是修这个环境的相关环境变量来实现各环境相互独立的) 总之:方便包的管理,避免版本冲突 常见的创建虚拟环境工具有py2exe, cx_Freeze, pyinstaller,pipenv,virtualenv等 新版自带虚拟环境:venv 个人比较常用的是virtualenv 和 anaconda 自带的创建虚拟环境功能 Virtualenv 安装: pip install virtualenv 创建虚拟环境 输入命令: virtualenv 环境名 如: virtualenv venv 为虚拟环境目录名 如果有多个python版本,可以通过命令选择虚拟哪个环境 virtualenv -p python路径 环境名 如: virtualenv -p /usr/bin/python2.7 venv 如: virtualenv --no-site-packages --python=python3 venv#得到独立第三方包的环境,并且指定解释器是python3 #添加参数--system-site-packages,项目检索库的时候

Window&Linux多CUDA环境安装不用愁啦

核能气质少年 提交于 2020-08-18 04:38:36
Windows 安装 conda安装 tf2.0 因为tf2需要cuda10,本人一直在用cuda9.2的1.x版本tensorflow。 此方法能有效避免系统python版本和pip包覆盖问题,还能成功安装多个版本的cuda 安装工具:Miniconda、PC 1.下载conda(miniconda更简洁,节省内存) 多个版本下载地址,自取~ Windows 下载地址 https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-4.7.10-Windows-x86_64.exe Linux 下载地址 https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-4.7.12-Linux-x86_64.sh Mac 下载地址 https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-4.7.10-MacOSX-x86_64.pkg 2.安装Miniconda 主要要注意这个地方,其他地方默认设置就好:如果是自带有python,请不要勾选,避免出现python版本覆盖问题;第一个选项可以不选,但后期要自己再设置 这里路径我选的是 D:\Miniconda3 3

【Anaconda3】更新conda的方法

空扰寡人 提交于 2020-08-17 20:03:50
遇到一个报错:failed with initial frozen solve. Retrying with flexible solve. 根据网上教程,先更新conda。 在Anaconda prompt 输入conda update,提示: conda update --prefix C:\Anaconda3 anaconda 按这条命令,更新conda环境。会更新非常多的包。更新完成后输入: conda update --all 来源: oschina 链接: https://my.oschina.net/u/4397718/blog/4429241

Working with Anaconda in Visual Studio Code

喜欢而已 提交于 2020-08-17 15:57:11
问题 I am getting a bit confused here, the latest Anaconda Distribution, 2018.12 at time of writing comes with an option to install Microsoft Visual Studio Code, which is great. When launching VSC and after Python: Select Interpreter and with a fresh install of Anaconda, I can see ~Anaconda3\python.exe which I assume is the Anaconda Python Environment, however, when I try to run some commands, I am getting: PS ~\Documents\Python Scripts\vs> ~/Anaconda3/Scripts/activate PS ~\Documents\Python

Working with Anaconda in Visual Studio Code

爱⌒轻易说出口 提交于 2020-08-17 15:56:09
问题 I am getting a bit confused here, the latest Anaconda Distribution, 2018.12 at time of writing comes with an option to install Microsoft Visual Studio Code, which is great. When launching VSC and after Python: Select Interpreter and with a fresh install of Anaconda, I can see ~Anaconda3\python.exe which I assume is the Anaconda Python Environment, however, when I try to run some commands, I am getting: PS ~\Documents\Python Scripts\vs> ~/Anaconda3/Scripts/activate PS ~\Documents\Python