How to create and source an Intel MKL environment with a specific version of python?
Using conda you can create environment with specific version of python.
conda config --add channels intel
conda create -n idp intelpython3_core python=3.x
Please note that "x" in "python=3.x" should signify which version of Python* you would like to install.
Documentation link:
https://www.intel.com/content/www/us/en/developer/articles/technical/using-intel-distribution-for-python-with-anaconda.html
Related
I got my new computer (Mac Pro M1) lately but I am not quite familiar with the MacOS system...
I enjoy using VSCode so I configured it with R language. I created an virtual environment with commands:
conda create -n R python=3.8
conda activate R
conda install -c conda-forge r-base=4.1.2
conda install -c conda-forge r-languageserver
and configured everything following this website. Everything goes fine when I run R language except for installing R packages. Here is a screenshot of my problem.
I can only install packages on R.app:
Can anyone help me? Thanks so much in advance!!!
I really want to get everything ready for coding in R language with VSCode!!! How to solve it? It seems not a problem of permission?
Updated infomation here:
Below are some screenshots showing what are in my R conda environment:
Also, the paths of R and Radian are added to settings of VSCode:
Kite can only auto complete python code in jupyterlab.
Is there a similar plug-in that allows R code to be automatically completed?
Thanks.
Yes, jupyterlab-lsp offers auto-completion (along other IDE features). It uses Language Server Protocol which requires you to install both:
one or more language servers (for R use R language server), and
an extension to JupyterLab (jupyterlab-lsp).
and then to enable continuousHinting option in Code Completion settings (via Advanced Settings Editor).
If you use JupyterLab 3.0 installed via conda it is as simple as:
conda install -c conda-forge 'jupyterlab>=3.0.0,<4.0.0a0' jupyterlab-lsp jupyter-lsp-r
If you use JupyterLab 3.0 installed via pip instead:
pip install 'jupyterlab>=3.0.0,<4.0.0a0' jupyterlab-lsp
R -e 'install.packages("languageserver")'
install nbextentations for jupyterlab.
nbextentations already have lightweigt auto complete add-on.lightweigth but enough for me.
link: https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/install.html
I tried to install R Studio (version 1.1.456) using the anaconda navigator by simply clicking on the install button. It was taking more than an hour, so I just figured it should be stuck.
I then tried to install it through the anaconda prompt but now it has also been stuck for around 30 minutes here:
What can I do to get around this?
Thank you in advance!
For various reasons up-to-date RStudio versions are not availabe on any conda channel I know. #merv's answer is the easiest solution, if you are happy to work with an older version of rstudio. Here is another suggestion, where you install RStudio outside of conda, but configure it to use a particular R installation, which is maintained in your custom conda environment. Step by step, this is how you procede:
Install the latest RStudio from the official sources
Create your custom conda environment CUSTOMENV, including an installation of r-base
conda create -n CUSTOMENV -c conda-forge r-base'>=4.0.0' ... [further packages]
Activate the conda environment
conda activate CUSTOMENV
Start RStudio from console
rstudio &
Important Note: I strongly endorse #mfakaehler's answer since all RStudio builds on Conda have effectively been abandoned. Install RStudio natively and launch from activated environment.
Create a new env instead. E.g.,
conda create --name rstudio_env -c r rstudio
Best practice for Conda is to create new envs for each project rather than using a monolithic base env. Generally, I find that the less one installs in base the better their experience with Conda will be.
i have a windows machine where I need to run openstak client. I have installed python 2.7.13 , but when I try installing "pip install python-openstackclient" I am getting below error.
Could not find a version that satisfies the requirement python-openstackclien
(from versions: )
No matching distribution found for python-openstackclient
Can anyone help me to correct the error ?
I run openstack CLI in windows under python 3.5.2 to execute use MINGW64 which comes with Git Bash
First install python 3
Run
pip install python-openstackclient
Note: Working on windows 10
By OpenStack client do you mean OpenStack compute? The controller node needs to be installed on a Linux machine. HyperV on Windows can be used as a compute node connected to the controller.
For more information please refer to this link:
https://ask.openstack.org/en/question/373/how-do-you-install-openstack-on-a-windows-pc/
I had Tensorflow installed with Anaconda. Now I want use it in R and I need to reinstall Tensorflow, because the note here
NOTE: You should NOT install TensorFlow with Anaconda as there are
issues with the way Anaconda builds the python shared library that
prevent dynamic linking from R.
I already tried to uninstall from Anaconda and install with pip but its came to the same place in anaconda directory. Tesorflow is working from terminal but in R shows Error: Command failed (1)
Anybody can help me to how I can solve the problem? Should I uninstall anaconda and install Tensorflow using pip?
You have several options on what to do. Probably the cleanest one is to install a system-wide python (if not installed yet) and then create a virtual environment. This basically takes your system python binaries and moves them to its own compartment where everythign is isolated from the rest, incl. anaconda. Once you are inside an activated virtual environment you can install all the necessary Python appendages for TensorFlow. Once that is done, make sure you set up a correct environmental PATH for TensorFlow from where R can reach it:
Sys.setenv(TENSORFLOW_PYTHON="/path/to/virtualenv/python/binary")
devtools::install_github("rstudio/tensorflow")
Example of the path to where you installed the virtual environment project would be, I think, something like ~/minion/medvedi/venv_medvedi/bin/python.
This is no longer an issue, the documentation was updated too.
See here:
https://github.com/rstudio/tensorflow/commit/4e1e11d6ba2fe7efe1a03356f96172dbf8db365e
With the help of Keras, we can install the TensorFlow package in R.
install_keras()
library(keras)
devtools::install_github("rstudio/keras")
install_tensorflow(package_url = "https://pypi.python.org/packages/b8/d6/af3d52dd52150ec4a6ceb7788bfeb2f62ecb6aa2d1172211c4db39b349a2/tensorflow-1.3.0rc0-cp27-cp27mu-manylinux1_x86_64.whl#md5=1cf77a2360ae2e38dd3578618eacc03b")
library(tensorflow)
Keras is a high-level neural network API for deep learning from TensorFlow Google.
my suggestion is to install anaconda and create an environment called "r-reticulate".
you can do it using anaconda navigator or
reticulate::conda_create(envname = "r-reticulate")
then to check that env detected by reticulate, use reticulate::conda_python().it must return directory of python.exe for your env.
after that you can install tensorflow by install_tensorflow(). [not working in my case]
so I install the tesnorflow from CMD.
follow these steps:
open the cmd :]
activate the r-reticulate env using conda activate r-reticulate (you may need your directory to conda directory if you did not add conda to your PATH)
use : conda install -c anaconda tensorflow
now in R, you can use TensorFlow.
for installing Keras, you can use pip install Keras. [i tried install_keras() function after the installation of tensorflow, but it ruined my TensorFlow installation also]
Eventually I found the best and fast method to do it in R:
devtools::install_github("rstudio/keras")
library(keras)
install_keras(method = "conda")
install_keras(tensorflow = "gpu")
tensorflow::install_tensorflow()