I have tried the following command, but no luck there.
conda update python
PackageNotInstalledError: Package is not installed in prefix.
prefix: /home/shrivatsa/anaconda3/envs/machine_learning
package name: python
First check for all the python version available to install using conda search python. It will give list like below.
# Name Version Build Channel
python 2.7.13 hac47a24_15 pkgs/main
.
.
.
python 3.8.2 h191fe78_0 pkgs/main
python 3.8.2 hcf32534_0 pkgs/main
python 3.8.2 hcff3b4d_13 pkgs/main
python 3.8.2 hcff3b4d_14 pkgs/main
python 3.8.3 hcff3b4d_0 pkgs/main
python 3.8.3 hcff3b4d_2 pkgs/main
Then, install the latest version using conda install python=3.8.3.
Related
I just downloaded miniconda Windows installer from official website. While installing got an error:
I use Windows 7 and found python 3.8 should work. Earlier I worked on Anaconda with python 3.7. Should I install Miniconda for python 3.7 though?
we have rhel 7.6 servers with python 2.7
now we want additionally to python 2.7 to install the python 3.x
so both python versions will be installed
the question is about the pip version
as I understand pip latest version for python 2.7 is 20.2.3
but in case we also install python 3.x
then how to know which pip version is relevant here ?
dose pip version support both python versions?
I'm new to machine learning. I literally have no idea what I'm doing but I need tools to understand how machine learning works.
I just download Anaconda Python from here. I saw that the version I downloaded is 3.7 but I need a 3.5.
I don't really understand how to install Numpy 1.10 as well as sklearn 0.17
Can you please guide me how to install these?
The best way to do this is by using a custom conda environment. You can do this by either of the following:
install the full version of Anaconda (the current version with Python 3.7)
install Miniconda for a much smaller download
Then open Anaconda Prompt in the Windows start menu. Then do:
conda create -n customenvname python=3.5 numpy=1.10 scikit-learn=0.17
Follow the prompts.
To activate the new environment and get off and running, just do conda activate customenvname. You are now in a Python 3.5 environment with all the dependencies you need:
(base) C:\Users\user>conda activate customenvname
(customenvname) C:\Users\user>python --version
Python 3.5.6 :: Anaconda, Inc.
(customenvname) C:\Users\user>conda list
# packages in environment at C:\Users\user\Miniconda3\envs\customenvname:
#
# Name Version Build Channel
blas 1.0 mkl
certifi 2018.8.24 py35_1
mkl 11.3.3 1
numpy 1.10.4 py35_2
pip 10.0.1 py35_0
python 3.5.6 he025d50_0
scikit-learn 0.17.1 np110py35_1
scipy 0.17.1 np110py35_1
setuptools 40.2.0 py35_0
vc 14.1 h0510ff6_4
vs2015_runtime 14.15.26706 h3a45250_0
wheel 0.31.1 py35_0
wincertstore 0.2 py35hfebbdb8_0
NOTE: the mkl package is an optimization of some of the most used scientific computing libraries maintained by anaconda.
I want to use the packages lpsolve55 and openturns but they are not working on python 3.6, is there any way to install them for this version of python?
lpsolve is available for python 3.x as well on conda-forge:
conda config --add channels conda-forge
conda install openturns lpsolve55
I have both anaconda Python 3.5 and Python 3.5 from python.org (on windows)
python -V
Python 3.5.1 :: Anaconda 4.0.0 (64-bit)
python3 -V
Python 3.5.1
py -V
Python 2.7.12
I want to create a virtualenv with only python 3.5.1 and not the anaconda version.
When I run
python3 c:\Python35\Tools\scripts\pyvenv.py venv
python -V still shows Python 3.5.1 :: Anaconda 4.0.0 (64-bit) after activating the environment
Is there anyway to get it to use the native 3.5 version?
You can use command line option -p during venv creation to force a particular interpreter to be used with it.
python3 c:\Python35\Tools\scripts\pyvenv.py -p python3 venv
Edited:
My bad, wrong virtual environment. As I can see you use venv from standard library and it's impossible to choose particular interpreter during virtual environment creation. On the other hand python3 -m venv venv command should use python3 interpreter for virtual environment which is one without anaconda in your case.
Edited 2:
I've just checked on windows:
C:\Users\usr>where python
C:\Python35\python.exe
C:\Users\usr\Anaconda3\python.exe
C:\Users\usr>C:\Users\usr\Anaconda3\python.exe --version
Python 3.5.2 :: Anaconda 4.1.1 (32-bit)
C:\Users\usr>C:\Users\usr\Anaconda3\python.exe -m venv myanacondavenv
C:\Users\usr>myanacondavenv\Scripts\activate.bat
(myanacondavenv) C:\Users\usr>python --version
Python 3.5.2 :: Anaconda 4.1.1 (32-bit)
(myanacondavenv) C:\Users\usr>deactivate
C:\Users\usr>C:\Python35\python.exe -m venv myvanilaenv
C:\Users\usr>myvanilaenv\Scripts\activate.bat
(myvanilaenv) C:\Users\usr>python --version
Python 3.5.1
(myvanilaenv) C:\Users\usr>deactivate
C:\Users\usr>
Reference