Due to some write permission on my new computer, I can only install to the base(root) environment. How can I add tensorflow to the root environment? Everything I have seen for install has been to create a new environment?
conda activate base
conda install -c anaconda pip
pip install tensorflow
After that, you can clone from base to create new environments.
Related
I am using conda as the Python3 package management tool, sometimes the conda repo did not contains some Python package. So I have to install it using pip, first I found the anaconda environment folder, the next step switch to the anaconda environment folder:
cd /usr/local/anaconda3/envs/pydolphin
then using this command to install package:
./bin/pip install musicbrainzngs
is there any short way to do this? is it possible to install it the PyCharm IDE the simple way? the PyCharm IDE using conda install by default.
First activate your conda environment:
conda activate <env>
This will switch to the version of pip installed in this environment. Then you can install using pip as per normal which will install it into your conda environment:
pip install musicbrainzngs
I'm currently trying to build a conda virtual environment for a project. However some packages are still not possible to install with the pip and conda commands (such as pyqt5 or liblsl for instance), but these are necessary for the project.
I tried to install these packages using the brew install command, while being in the virtual environment, but the packages do not appear in the conda virtual environment.
So, do you know if it is possible to install packages with the brew command and include it in the virtual environment ?
trying to install tensorflow using conda package manager
using following command
conda install -c conda-forge tensorflow
but it gives following error while executing transaction
CondaError: Cannot link a source that does not exist.
C:\ProgramData\Anaconda3\Scripts\conda.exe
I faced the same issue and
conda update -n root conda
Solved the problem. The env name "root" is for conda <= 4.3, otherwise use:
conda update -n base conda
I hope this helps.
Try to run conda clean --all --yes and conda update anaconda.
Do you have a conda.exe file in the following folder C:\ProgramData\Anaconda3\Scripts\?
Do you use the latest Conda?
Another solution could be to create a conda environments conda create -n name_environment pip python=3.5 and using pip to install tensorflow pip install tensorflow inside the new environment
after having activated it (activate name_environment).
P.S. I can not write a comment because I do not have enough reputation.
EDIT - Now i can!
I have installed the pygal package through the following command line:
conda install -c akode pygal
However, when I search this package in the Anaconda, I can only find this package in the base (root) environment. When I try to search this pygal package in my newly created environment, nothing can I find.
Why does this happen? and is there any solution to this problem?
When you are not in an environment and run conda install , it will install it in the base. If you activate your environment then install the package using conda install, it will apply to your environment.
source activate data_visualization_coursera
conda install -c akode pygal
Or you can install a specific package to an environment using this command
conda install -n <environment_name> <package_name>
You can find all of the documentation here https://conda.io/docs/user-guide/tasks/manage-environments.html
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