Updating package on Anaconda environment - python

Is there a way to update only the django package on the python 3 environment to version 2.0?
My base version of python is 2.7.14. Anaconda 4.4.4. I created a new environment for python 3.6.3.
I installed django 1.11.8 (as this is the latest version available for python 2.7) on both environments but I need django 2.0 on my python 3 environment.
When I try:
conda install django=2.0
PackagesNotFoundError: The following packages are not available from current channels:
django=2.0
Current channels:
https://repo.continuum.io/pkgs/main/win-64
https://repo.continuum.io/pkgs/main/noarch
... with a few more similar links
Am I missing something?
Is this even possible to do within an environment in the python 2 Anaconda?

Try this:
conda install django=2.0 -c conda-forge
That will use the conda-forge channel.

Related

How to install seamsh in python

I tried to install seamsh 0.4.4(https://pypi.org/project/seamsh/) but counld not.
I spent a lot of time on it.
I needed gdal library to use seamsh.
So I installded it by conda because it was too complex to install it without conda.
But conda was not supported seamsh, so I don't know what to do.
Could you tell me how to install seamsh?
I use windows and vscode.
Thank you.
There's a pending PR to add it to Conda Forge. In the meantime, one can install it from PyPI. For example, try using the following environment:
seamsh.yaml
name: seamsh
channels:
- conda-forge
- nodefaults # only use conda-forge
dependencies:
## core software
- python=3.10 # set to preference
- pip
## libraries
- gdal
## Conda Python packages
- numpy
- scipy
- python-gmsh >=4.10 # used to ensure latest version
## PyPI Python packages
- pip:
- seamsh
Create with:
conda env create -n seamsh -f seamsh.yaml
At least on macOS, I'm seeing pip reinstall the Python gmsh package, despite the Conda Forge version being installed. Unsure why it isn't acknowledging the Conda version.

installing python 2.7.9 on conda environment

Hello I need to create an anaconda environment with python version = 2.7.9. The issue is that there are no ways that I can install that python version using conda. The channels that I have doesnt provide me that version, is there a way in which I can install a specific version of python using conda giving the fact that my current channels doesnt provide me the required version?
There is an archived version available on the free channel. Try
conda create -n py279 -c free python=2.7.9

Installing tensorflow gpu in anaconda 5.3

I have recently installed anaconda 5.3 and it came with python 3.7 preinstalled. Now when I checked tensorflow website it's says tensorflow does not support 3.7 only 3.6.
Tensorflow Requires Python 3.4, 3.5, or 3.6
What can I do now to have tensorflow gpu for my pc. Any help is appreciated. Is there any workaround?
Thanks.
You should create a new conda virtual environment with python 3.6, then install tensorflow into that.
At the creation of the new env you can freely choose the python version you want to use.
This is one of the essence of conda and virtual envs in general.
A bit more details:
Inside of the anaconda-navigator you can choose Environments, then choose create. Here you can give the new environment name and the packages basis i.e. Python or R and the versions you want to use it for the environment. Then you have to install your custom packages beside of the default ones. Here you can install tensorflow-gpu too.
For installing packages you can choose Anaconda navigator GUI or inside of the Anaconda command shell with conda conda install <package> or in the Anaconda command shell pip install <package>.
In general you should prefer Anaconda package management i.e. GUI or conda to the package versions be consistent, what conda manages well. In some cases -choose always the package developer's suggestion- however, you may choose pip install.

Why matplotlib doesn't update in Anaconda to the 2.0 version

I was lately trying to update all my Anaconda packages:
conda update conda
conda update anaconda
Some of them still were not updated, so I also did conda update --all.
Right now my conda version : 4.3.16, which seems to be the latest release. However, for some reason, matplotlib still has old version:
conda list
matplotlib 1.5.1 np111py35_0
According to the Anaconda changelog, it should be updated to 2.0 version: matplotlib from 1.5.3 to 2.0.0.
My installed python version is 3.5.2, if this matters.
UPD: Seems that spyder-app is blocking update because of problem with dependencies:
conda install anaconda=4.3.1
UnsatisfiableError: The following specifications were found to be in conflict:
- anaconda 4.3.1* -> spyder 3.1.2 py34_0
- spyder-app -> spyder 2.3.3
Use "conda info <package>" to see the dependencies for each package.
conda install matplotlib=2
UnsatisfiableError: The following specifications were found to be in conflict:
- matplotlib 2.0*
- spyder-app -> spyder 2.3.0 -> pyqt 4.* -> qt >=4.8.6,<5.0
- spyder-app -> spyder 2.3.0 -> pyqt 4.* -> sip >=4.16.4,<4.18
Use "conda info <package>" to see the dependencies for each package.
UPD2: Problem was solved by removing spyder-app:
conda remove spyder-app
conda update anaconda
Matlotlib was updated to the 2.0 version, among other updated packages. I also checked if Spyder IDE still works, and it still is able to run.
It probably is a dependency conflict. The anaconda package is just a meta-package that bundles packages, if some package can't be updated because of a package you installed (maybe requiring matplotlib < 2, or even indirectly by requiring a package and version that matplotlib depends on) then you probably can't install the newest version of the anaconda package. You could try to install the newest anaconda package (currently 4.3.1) yourself:
conda install anaconda=4.3.1
But you can also try to install a specific version of matplotlib manually and see what happens (there should be an instructive message if it can't install it because of dependencies):
conda install matplotlib=2
In your case it's spyder-app that is responsible. It's a deprecated package and not included in newer versions of anaconda so one possibility is to remove it:
conda remove spyder-app
and then try the update of anaconda or matplotlib.
Another way would be to create a new environment and then you can choose which environment to use when:
conda install -n mynewenvironment python=3.5 anaconda
and then use the new environment when you need matplotlib 2 and the old environment if you need spyder-app (and don't care about the matplotlib version).

Anaconda version with Python 3.5

I want to install tensorflow with python 3.5 using anaconda but I don't know which anaconda version has python 3.5. When I go to anaconda download page am presented with Anaconda 4.3.1 which has either version 3.6 or 2.7 of python
You can install any current version of Anaconda. You can then make a conda environment with your particular needs from the documentation
conda create -n tensorflowproject python=3.5 tensorflow ipython
This command has a specific version for python and when this tensorflowproject environment gets updated it will upgrade to Python 3.5999999999 but never go to 3.6 . Then you switch to your environment using either
source activate tensorflowproject
for linux/mac or
activate tensorflowproject
on windows
Per this announcement, Anaconda upgraded to Python 3.6 starting with version 4.3, so... you probably want the 4.2.0 package from the installer archive.
According to the official docu it's recommended to downgrade the whole Python environment:
conda install python=3.5
Anacoda3-4.2.0 Uses python 3.5
You can find the same in the link given below :
https://repo.continuum.io/archive/Anaconda3-4.2.0-Windows-x86_64.exe
I faced the same problem and found the correct version by checking the available Anaconda 4.2.0 distributions in installer archive here
command install:
python3.5: conda install python=3.5
python3.6: conda install python=3.6
download the most recent Anaconda installer:
python3.5: Anaconda 4.2.0
python3.6: Anaconda 5.2.0
reference from anaconda doc:
How do I get Anaconda with Python 3.5 or 3.6?
To highlight a few points:
The docs recommend using an install environment:
https://conda.io/docs/user-guide/install/download.html#choosing-a-version-of-anaconda-or-miniconda
The version archive is here:
https://repo.continuum.io/archive/
The version history is here:
https://docs.anaconda.com/anaconda/release-notes
"Anaconda3 then its python 3.x and if it is Anaconda2 then its 2.x" - +1 papbiceps
The version archive is sorted newest at the top, but Anaconda2 ABOVE Anaconda3.
It is very simple, first, you need to be inside the virtualenv you created, then to install a specific version of python say 3.5, use Anaconda, conda install python=3.5
In general you can do this for any python package you want
conda install package_name=package_version

Categories

Resources