Conflict while installing ggplot to conda python 3 environment - python

I tried to run
conda create --name test python=3
source activate test
conda install -c conda-forge ggplot=0.11.5
but after the last command I get
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata: ......
Solving package specifications: ....
The following specifications were found to be in conflict:
- ggplot 0.11.5* -> python 2.7*|3.4*|3.5*
- pip (target=pip-9.0.1-py36_1.tar.bz2) -> python 2.7*|3.4*|3.5*
- pip (target=pip-9.0.1-py36_1.tar.bz2) -> setuptools
- python 3.6*
- setuptools (target=setuptools-27.2.0-py36_0.tar.bz2) -> python 2.7*|3.4*|3.5*
- wheel (target=wheel-0.29.0-py36_0.tar.bz2) -> python 2.7*|3.3*|3.4*|3.5*|3.6*
- wheel (target=wheel-0.29.0-py36_0.tar.bz2) -> setuptools
Use "conda info <package>" to see the dependencies for each package.
I am able to run
conda install -c bokeh ggplot=0.9.4
instead, but that is an older version. I am not sure what would be a practical way of resolving this if I want to use the newer version of ggplot.
I could install the newer version in python 2.7 though.

Running 'conda create --name test python=3' will create a Python 3.6 environment by default.
If you take a look here: https://anaconda.org/conda-forge/ggplot/files you will see that the conda-forge version of ggplot is not compatible with Python 3.6. If you create an environment with Python 3.5 then you will be able to run this command again and successfully install your desired version of ggplot.
conda create --name test1 python=3.5
source activate test1
conda install -c conda-forge ggplot=0.11.5

Related

Update python from 3.5 to 3.6 in conda

I want to upgrade my python version from 3.5 to 3.6 to use the new features.
I first copy the base env as base3.6 using Clone base environment in anaconda,
then I want to upgrade the python3.5 to 3.6 using conda install python=3.6, but I have this error
(base3.6) D:\Desktop\GOC-VRPTW-master>conda install python=3.6
Solving environment: failed
UnsatisfiableError: The following specifications were found to be in conflict:
- defaults/win-64::psutil==4.3.1=py35_0 -> python=3.5 -> python_abi=[build=*_cp35m] -> pypy[version='<0a0']
- python=3.6
Use "conda info <package>" to see the dependencies for each package.
Similar problem, but different in details conda install python=3.6 UnsatisfiableError
I find that reinstalling a new environment is a better choice.

How to install python with conda?

I'm trying to install python 3.9 in a conda enviroment. I tried creating a new conda env using the following command,
conda create --name myenv python=3.9
But I got an error saying package not found because python 3.9 is not yet released
So, I manually created a folder in envs folder and tried to list all envs. But I couldn't get the manually created new environment.
So, how do I install python 3.9 in a conda env with all functionalities like pip working?
To create python 3.11 conda environment use the following command
conda create -n py311 python=3.11
py311 - environment name
Update 3
To create python 3.10 conda environment use the following command
conda create -n py310 python=3.10
py310 - environment name
Update 2
You can now directly create python 3.9 environment using the following command
conda create -n py39 python=3.9
py39 - environment name
Update 1
Python 3.9 is now available in conda-forge.
To download the tar file - https://anaconda.org/conda-forge/python/3.9.0/download/linux-64/python-3.9.0-h852b56e_0_cpython.tar.bz2
Anaconda Page - https://anaconda.org/conda-forge/python
As pointed out in the comments, python 3.9 is not yet there on any channels. So, it cannot be install yet via conda.
Instead, you can download the python 3.9 executable and install it.
Once the installation is done, a new executable will be created for python 3.9 and pip 3.9 will be created.
Python:
python3.7
python3.7-config
python3.7m
python3.7m-config
python3.9
python3.9-config
pip
pip
pip3
pip3.7
pip3.8
pip3.9
pipreqs
In order to install ipython for python 3.9,
pip3.9 install ipython
On 6-Oct-2020, Python 3.9 was made available on conda-forge: https://anaconda.org/conda-forge/python. However, most of the other packages (including some of the essentials to create a basic environment) didn't explicitly support Python 3.9 yet.
However (as of 15-Oct-2020), the basic dependencies appear to have been fixed and the following command now works:
conda create -c conda-forge python=3.9 -n py39-demo
You can now simply just run
conda create --name myenv python=3.9
And it will create your python 3.9 virtual environment simply.

How to run Spyder with Python 3.7 with Anaconda

I have installed Anaconda on a Windows 10 machine which comes with Spyder and Python 3.6 but I wish to upgrade to Python 3.7
To create an Anaconda Environment with Python 3.7 is easy by using:
conda create --name py37 python=3.7
or:
conda create --name py370 python=3.7.0 --channel conda-forge
However starting Spyder in this environment will throw it back to Python 3.6.
I tried specifing the python.exe (for version 3.7) directly in Tools -> Settings of Spyder, however upon restarting the Spyder Kernels can't be launched and will display that they need the packages: ipykernel and cloudpickle .
When trying to conda install them in the environment the following appears:
The following packages will be DOWNGRADED:
python: 3.7.0-hea74fb7_0 --> 3.6.6-hea74fb7_0
Which would downgreade python from 3.7 to 3.6 again.
My final try was to use the command:
conda install python==3.7
which has failed with the output
Solving environment: failed
UnsatisfiableError: The following specifications were found to be in conflict:
- python-dateutil -> python[version='>=2.7,<2.8.0a0']
- python-dateutil -> six
- python==3.7
Use "conda info <package>" to see the dependencies for each package.
The question is not how to upgrade Conda to Python 3.7, but how can I get Spyder to work with Python 3.7 in its own environment
When you run spyder from the CMD/terminal, your operating system tries to find the spyder executable on your system's PATH. In this case, it will default back to the base environment's version of spyder, which runs Python 3.6.
The best way I have found so far is to install spyder to the new environment; activate the environment, and then run spyder (which should fire up the version in the local environment).
conda create --name py37 python=3.7
conda install --name py37 spyder -c conda-forge
conda activate py37
spyder
However, this requires the version of spyder to support python 3.7. Currently that is not available (as of 2 July 2018), but it should not be too long coming.
EDIT:
Spyder for Python 3.7 is available.

Installation failed while installing pydoop using conda

I have anaconda installed on ubuntu, i am using spyder for python development
I am trying command
conda install -c ijstokes pydoop
it is giving:
Fetching package metadata .............
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
- pydoop -> python 3.5* -> openssl 1.0.1*
- pydoop -> python 3.5* -> xz 5.0.5
- python 3.6*
Use "conda info " to see the dependencies for each package.
Dont know what to do next please help.
The error states that there is a version conflict between pydoop which has a dependency on python 3.5* and python 3.6*. The easiest way to fix this is to make an environment with Python 3.5.
conda create -n py35 -c ijstokes python=3.5 pydoop
This package for conda is fairly old. Why not try to install pydoop from pypi?
pip install pydoop

Anaconda move to Python 3

I am trying to make my Anaconda Python 2 into Python 3 on my Mac, and have been trying almost everything now. Preferably I would want to move to 3.6 but I am yet to manage to get any Python 3 version working. I started with conda install python=3.6 but got dependency errors. Then I though if I download the Anaconda installer maybe it will update everything and there will be no more dependency errors, but the installation program told me to run conda update anaconda. I still get dependency errors though. This is what I get right now:
For version 3.6:
$ conda install python=3.6
Fetching package metadata .........
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
- argcomplete -> python 3.3* -> openssl 1.0.1*
- argcomplete -> python 3.3* -> xz 5.0.5
- python 3.6*
Use "conda info <package>" to see the dependencies for each package.
and for version 3.5:
$ conda install python=3.5
Fetching package metadata .........
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
- backports_abc -> python 3.4*
- python 3.5*
Use "conda info <package>" to see the dependencies for each package.
What am I doing wrong and what must I do? (also, why is this so complicated?)
Update: Inspired by https://docs.continuum.io/anaconda/install I tried uninstalling like:
$ anaconda-clean -y
Backup directory: /Users/jonathan/.anaconda_backup/2017-04-24T160137
followed by the installation program again. The installation failed, anaconda is still supposed to be installed...
I know that you have uninstalled and reinstalled but you can create environments with other versions of Python.
conda create --name py36 python=3.6 anaconda
source activate py36
This would create an environment with Python 3.6 and all of the default packages in Anaconda.
You can always create different versions of python in different folders. Simply specify the python version you want to use in a NEW folder. And then activate it.
conda create -n myProject python=3
source activate myProject
I ended up removing the anaconda directory and reinstalling.

Categories

Resources