Anaconda 2.3.0 with python 3.4.0 is installed on my Windows PC.
I want to upgrade to python 3.5.
I already created an Anaconda environment using conda create --name py35 python=3.5 and activated it using activate py35.
After installing python 3.5 and conda 6.0.1, still default version is 3.4.2
even in cmd after activating py35, when I write python --version it says:
python 3.4.2 :: Anaconda 2.3.0 (64-bit)
please help
The command conda create --name py35 python=3.5 creates a new environment which has no effect, by design, on your default environment. To upgrade the default version do
conda install python=3.5
(out of interest, why not go to the latest python release, 3.6? In that case you can just do conda update python)
Related
I'm trying to install python 3.7 env for miniconda on my raspberry pi 4 model B.
But when I'm doing conda install python 3.7
I get Error: No packages found in current Linux-armv7l channels matching: 3.7.
how can I install python 3.7 in some way on that miniconda?
You can try to create new environment with this python version:
conda create -n your_env_name python=3.7
And then you need to activate it:
activate your_env_name
Here you will find more about conda environments.
miniconda only have under python3.4 for armv7l
so you need to use python3.7 for armv7l(no anaconda or miniconda just python)
You might want to try with this command : conda install -c anaconda python=3.7
Tell us if this works
I am using anaconda and python 3.8. Now some of my codes need to be run with python 2. so I create a separate python 2.7 environment in conda like below:
after that, I installed spyder, then launcher spyder amd spyder is showing I am still using python 3.8
how do i do to use python 2.7 in spyder with a new environment?
Thanks
conda create -n py27 python=2.7 ipykernel
conda activate py27
pip install spyder
According to the documentation here, this should create a python2.7 virtual environment (29 April 2021) with spyder installed. I verified that spyder version 3.3.6 is python2.7 compatible
conda create -y -n py27 python=2.7 spyder=3.3.6
However, I could not run spyder in the py27 environment due to conflicts that conda failed to catch. The workaround shown by asanganuwan on this Spyder Github Issue page worked for me also
Found a workaround to use Spyder on python 2.7.
setup two virtual environments for Python 2.7 and 3.6.
Launce anaconda navigator and install spyder 3.3.6 on both the environments
Launch spyder on the environment with Python 3.6
Preferences-->Python Interpreter --> set the Python path for 2.7
Restart Spyder
Done!
So my recommendation is next run
conda create -y -n py36 python=3.6 spyder=3.3.6
conda activate py36
spyder
And follow the last three instructions from asanganuwan.
Also you should use the conda package manager as much as possible since it is smarter with managing requirements. When I try to use pip install spyder after activating the environment, it warns of version conflicts and fails to start.
I suggest to first search for an anaconda 2.7 version you want, then install it explicitly, this will make resolving much faster, give you a "stable" anaconda and allow you more control while installing all anaconda packages:
First:
conda search anaconda
Then select a version that has 27, in my case:
# Name Version Build Channel
anaconda custom py27_0 pkgs/main
anaconda custom py27_1 pkgs/main
anaconda custom py27h689e5c3_0 pkgs/main
anaconda custom py35_1 pkgs/main
............
anaconda 5.3.1 py27_0 pkgs/main
anaconda 5.3.1 py37_0 pkgs/main
............
anaconda 2019.10 py27_0 pkgs/main
............
I went with:
conda create -n py2 Python=2.7 anaconda==5.3.1 -y
You can manage environments from Ananconda's Navigator. https://docs.anaconda.com/anaconda/navigator/getting-started/#navigator-managing-environments
I guess you are on previous pip;
Use which pip command to find out your current pip environment.
Modify your .bash file and set another new environment variable for your new pip.
Source your .bash file.
Try to install spyder by using new pip env variable; something like pipX install spyder
I install anaconda with python version 3.7 on Windows.
Then I want to install TensorFlow, but it don't support python 3.7.
I try to install python 3.5, but get this error:
How to resolve this conflict to install python 3.5?
You can create an environment with the Python version of your choice.
Example create an environment called deep with python 3.5 and tensorflow:
conda create -n deep python=3.5 tensorflow
After that we can activate it with
conda activate deep
While in this environment you will have Python 3.5 and tensorflow. You can add other packages to your environment anywhere. E.g. adding latest scipy, pandas, and jupyter
conda install --name deep scipy pandas jupyter
Updated: While in the environment, you don’t have to specify the environment name, when installing packages. You can do:
conda install package_name
When done doing awesomeness, you can deactivate as so:
conda deactivate
;)
So your workflow when working with Tensorflow, would include activating your ‘deep’ environment and use Python 3.5 there ;) e.g.
conda activate deep
jupyter lab
Assuming you have installed tensorflow and jupyter, this will start a service on your default browser where you can start building your project.
Happy coding ...
Check out conda documentation https://conda.io/docs/user-guide/tasks/manage-pkgs.html
Today Tensorflow doesn't support Python 3.7 . You have to create a new environment with Python 3.4, 3.5 or 3.6. With conda it's easy to handle different environments and versions. In addition it's recommended using pip to install Tensorflow.
Python 3.6 with CPU:
conda create -y -n name_of_env python=3.6 # create new environment
source activate name_of_env # activate the new environment
pip install tensorflow # install tensorflow
Python 3.6 with GPU (please check the additional setup for using a GPU):
conda create -y -n name_of_env python=3.6
source activate name_of_env
pip install tensorflow-gpu
Tip: Finally you can test your installation with the following command:
echo 'import tensorflow as tf; print(tf.__version__)' | python
# 1.12.0
So I have an old version of conda install
conda -V
conda 4.5.4
the current version of anaconda is 5.1 and it is running python 3.6.4
I wanted to test my code base on the newer version of conda so I tought I could install a new env first with conda and it would give me the latest version of the conda distribution
conda create -n py364 python=3.6 anaconda
I thought this would be installing the latest anaconda with python 3.6.4 but it is actually installing python 3.6.1
is it possible to install the new anaconda version in a env?
It can depends on your environement.
Test: conda search python to see the available versions for your environement.
Have you tried: conda create -n py364 python=3.6.4 anaconda ?
as #darthbith suggested in the comments
you should always update your conda version using
conda update conda
then if you call
conda create -n py364 python=3.6 anaconda
it will install the latest distribution of anaconda on the with python 3.6.
or you could also call
conda create -n conda51 anaconda=5.1
to install the actual distribution you are targeting
I am looking to install the package pyspharm
I am running the 64-bit Windows and have the 64-bit version of Anaconda installed.
However, whe I look for packages with
anaconda search -t conda pyspharm
It appears as if there are no channels with a package made for the win-64 platform.
Is there any way I can still install it?
Crate a 32bit python environment:
set CONDA_FORCE_32BIT=1
conda create -n py27_32bit python=2.7
enable py27_32bit
conda install --channel https://conda.anaconda.org/conda-forge pyspharm
Just remember to set CONDA_FORCE_32BIT= (set empty) if you are going to use the root environment 64bit