Installation problem for Tensorflow with conda - python-3.x

I am getting this error while using 'conda install tensorflow' to install tensorflow on Anaconda
CondaVerificationError: The package for tensorflow-base located at
'Lib/site-packages/tensorflow-2.1.0.data/purelib/tensorflow_core/include/tensorflow_core/core/grappler/optimizers/generic_layout_optimizer_transposer_factory.h'specified
in the package manifest cannot be found.
Any Help will be appreciated, Thanks.

Uninstall the tensorflow and install it again :
Try this:
pip install tensorflow #CPU only
pip install tensorflow-gpu #For GPU support
or
conda install -c conda-forge tensorflow

Related

Having issues to import imblearn python package on Jupyter notebook on Anaconda

I wanted to install imbalanced-learn using pip install imbalanced-learn. Then I have tried import
from imblearn.ensemble import EasyEnsembleClassifier
This import gave me the following error. I did try with uninstall imbalanced-learn and re-install imbalanced-learn, but it didn't help.
ImportError: cannot import name '_joblib_parallel_args' from 'sklearn.utils.fixes' (C:\Users\Jishan\anaconda3\envs\summerprojects\lib\site-packages\sklearn\utils\fixes.py)
I also tried
pip: pip install -U imbalanced-learn
anaconda: conda install -c glemaitre imbalanced-learn
They were not helpful as well. I was using Anaconda virtual environment. I appreciate your suggestions. Thanks!
you can try this :
conda install -c conda-forge imbalanced-learn to update documentation
sudo pip3 install imblearn to install imblearn
on command prompt : pip3 install imblearn
on anaconda !pip3 install imblearn

I am trying to install intel optimized pytorch in different ways

I am very first time using pyTorch. I am trying to install it. In how many ways I can do this?
Please provide the steps for that.
You can install PyTorch in 3 ways.
Using pip
Using conda
From source
1.Intel Optimized Pytorch Installation
Install the stable version (v 1.0) on Linux via Pip for Python 3.6.
pip install https://download.pytorch.org/whl/cpu/torch-1.0.1.post2-cp36-cp36m-linux_x86_64.whl
pip install torchvision
2.Conda Pytorch Installation
conda install pytorch-cpu torchvision-cpu -c pytorch
3.PyTorch Installation from source
Create a new environment:
conda create -n <env_name> python=3.6
export CMAKE_PREFIX_PATH=/home/user/.conda/envs/<env_name>
source activate <env_name>
Install dependencies:
conda install numpy pyyaml mkl mkl-include setuptools cmake cffi typing
conda install -c conda-forge opencv
conda install Pillow
Get the PyTorch source:
git clone --recursive https://github.com/intel/pytorch
cd pytorch
mv caffe2/contrib/cuda-convnet2/ /tmp
# Fix the bug removing the old package out
Install PyTorch:
python setup.py install 2>&1 | tee build.out
Hope this will help you.

i tried installing tensorflow using 'pip install tensorflow ' in anaconda prompt and command prompt. its showing following output

Found existing installation: wrapt 1.10.11
Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
Try the below commands mentioned, it worked for me
conda update wrapt
pip install tensorflow
(1) First try to install wrapt manually using following command
pip install wrapt --upgrade --ignore-installed
make sure that you use "--ignore-installed" flag when install 'wrapt' as above mentioned command
(2) Then install tensorflow with pip
eg:
pip install tensorflow==1.14
this should work
You might want to upgrade numpy with following incase its not compatible otherwise it will throw errors.
pip install numpy --upgrade
I was getting this error while installing from conda environment. Always upgrade conda or pip before a new installation.
Following worked for me:
[Optional] If installing in conda environment, then temporarily remove the conda env:
conda remove --name myenv --all
Update all conda packages:
conda update --all
Create conda env again:
conda create -n myenv
Activate conda env:
conda activate
Install tensorflow:
pip install tensorflow

Pytorch installation problems with Anaconda

After having upgraded my environment's python to Python 3.61, I attempted to install pytorch using this command:
conda install -c peterjc123 pytorch
However I got this error:
Fetching package metadata .............
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
-pytorch
-pyqt
I also used the commands
conda install -c peterjc123 pytorch cuda90
conda install -c peterjc123 pytorch cuda80
But the result is still the same. Anyone got a clue how to solve this?
The problem was solved after downgrading from Python 3.6.2 to Python 3.5.1 after running:
conda install -c anaconda python=3.5.1
After running this command, run:
conda install -c peterjc123 pytorch
Pytorch should install as per normal. A similar issue occurs for openCV as well
An alternative way to install pytorch using anaconda is
conda create -n py_env python=3.5
source activate py_env
conda install pytorch-cpu torchvision -c pytorch
Go to python shell and import using the command
import torch
Hope this helps.

i want to install tensor flow in anaconda but it shows error :

i tried many ways to install tensor flow on my windows system with anaconda 5.0 and python 3.6
pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0-py3-none-any.whl
pip3 install --ignore-installed --upgrade tensorflow
conda install -c conda-forge tensorflow
conda config --add channels conda-forge
conda install tensorflow
but it shows errorpackage missing in current channel
after it i also tried to degrade my python version from anaconda navigator after the whole process python version is same as before.
Finally , Solved my problem by reinstalling the anaconda and python 3.5. and after the re-installation i install tensor-flow by anaconda navigator and it worked for me.

Resources