How to install rstudio with conda - rstudio

Anaconda Navigator home screen
I am new to this whole process of working with conda, so forgive me in advance.
I am attempting to download and run r-studio through the anaconda navigator software. Every tutorial I see online simply starts with the prompt on their home screen to download r-studio, but that prompt does not exist for me, and I there is no mention of how to get r-studio to appear in this landing page.
I opened an anaconda prompt and attempted to run a download manually for r-studio, but I keep getting this error:
(R-Programming) C:\Users\Chance>conda install -c r rstudio Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Until it inevitably crashes.
I am not sure of what information you may need about my system to help me find a solution, so instead of posting a million error messages that might be related, if the answer isn't obvious, I will give info as needed.

I think what the tutorials are mentioning about installing the R studio after opening conda is the best solution. Try reinstalling the Anaconda again. I wonder if any file got corrupt when you installed it.
When you open the "Anaconda Navigator" you should be getting a screen like this below: Anaconda Navigator screen
When you click on RStudio it should work. For more documentation please check this https://docs.anaconda.com/anaconda/user-guide/tasks/using-r-language/

Related

On macOS Monterey 12.5, how can I allow Conda to collect package metadata from <https://repo.anaconda.com/pkgs/main/osx-64/current_repodata.json>?

I am on a MacBook M1 Pro, macOS Monterey 12.5, using conda 4.13.0 in zsh(z-shell) to attempt package installations.
(My goal is to install tensorflow-deps from the apple channel of Anaconda, so I can use GPU-accelerated TensorFlow on my M1 Pro. As far as I understand, Conda is the only way to install apple's tensorflow-deps package.)
Problem
Whenever I try to install packages with Anaconda (conda) in the terminal, I get:
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/osx-64/current_repodata.json>
Note that I managed to successfully access this resource with this command:
curl https://repo.anaconda.com/pkgs/main/osx-64/current_repodata.json
So it seems like it's just the Conda tool that is failing.
The issue has been marked as stale in GitHub, and has not been solved.
Similar issues have been addressed before and solved, but since those solutions are not working, I am assuming that my issue is somehow different, and thus I am creating a new question to nuance the discussion.
Attempted solutions
I have tried everything from the discussion of the GitHub issue, and more.
I have to download and convert my root certificate, and then:
export REQUESTS_CA_BUNDLE=/path/to/root/certificate.pem
as outlined here, but that does not fix the issue.
I have tried replacing
~/opt/anaconda3/lib/python3.9/site-packages/certifi/cacert.pem
with the same generated cert, which did not work.
Doing conda update -n base -c defaults conda as suggested in the GitHub issue shows the same CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/osx-arm64/repodata.json> error.
Some users report that using the -k/--insecure flag or configuring Conda to not verify ssl fixes this issue. This is not really a solution in the first place, and also it does not work for me.
Some Windows users report that copying come DLLs around fixes the issue, but I don't know what the equivalent of this would be on Mac, if there is one.

Anaconda Navigator (2.0.4 --> 2.1.1) won't update on Windows 10

I am just wondering if anyone has had the issue stated in the title.
Context
I am currently on anaconda navigator version 2.0.4 (this was a July 2021 release if I am correct), and I am looking to upgrade the navigator to version 2.1.1 (the latest release as of this posting). My OS is Windows 10.
Problem
When I update from the navigator itself (on the "upgrade now" button), the update says it's running but never finishes (I sat about an hour before dismissing it).
I tried manually installing the update, but it just tells me that "all requested packages are already installed" (see below)
I even tried going into anaconda powershell prompt, deactivating conda and updating it, but still the same issue ("all requested packages are already installed"), see below:
I am wondering if anyone has the same issue as I do? Are there any more potential fixes I could try? Preferably one in which I don't have to uninstall and reinstall anaconda. The navigator is important to me because that's where I install all my packages into the various virtual environments. I can work around it if it's unfixable but I'd rather have it working straight. Appreciate the help.
I had a simmilar problem. I was trying to upgrade from version 1.9.12. I tried severeal times with this sequence of commands:
conda update conda
conda update --all
conda deactivate
conda update anaconda-navigator
But it was unsuccesful. anaconda-navigator did not upgrade and there was still an upgrade button in the navigator app, which should upgrade to the latest version, which was 2.1.2 at the time. Clicking
this button was also unsuccesful.
Then i found this https://docs.anaconda.com/anaconda/install/update-version/, how to install a specific version of a package.
I tried this command:
conda install anaconda-navigator=2.1.2
And it worked. The output of the command was suggesting something was wrong with repositories:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: done
But it finnished successful. At the end I also did this.
conda update conda
conda update --all
And now a have everything updated to tha latest version, including anaconda-navigator. I hope this somehow helps.
Right click the shortcut of the navigator (or the icon in Start) and choose "Run as administartor".
Once the navigator opens run the upgrade

Trouble updating to Anaconda Navigator 1.10.0 (Windows) - stuck on Solving environment

Anaconda Navigator does not upgrade after selecting the prompt to do so
Apparently this is a known issue (Trouble updating to Anaconda Navigator 1.10.0 (MacOS)) but the solution there
conda deactivate
conda update anaconda-navigator
doesn't work for me.
Other posts suggested first running
conda update --all
which I did, apparently successfully, but when I go back to try the update above I still get stuck on Solving environment:
It's been stuck there for more than 12 hours, so I think it's safe to conclude it's not going to get unstuck.
Any suggestions?
Could the "InvalidArchiveError" related to the pytorch archive (see image) be an issue (I wouldn't have thought so)?

How can I do a fresh installation of Python and Jupyter Lab?

I have been using venv to create virtual environments to work with Jupyter Lab. I tried Anaconda for awhile, but couldn't get the widgets working. I went back to a pip,venv setup and everything worked. Then after not using the setup for awhile, Jupyter Lab was freezing when I pressed CTRL+F to find where a variable was being used. It proceeded to freeze even after restarting the kernel, even after deactivating and reactivating the environment. The folder the environment was in won't let me delete it. Creating a new environment to start from scratch didn't fix it. Reinstalling Python and creating a new environment didn't fix it. I see that Pip has cached a lot of the packages and so installing things are pulled from the cached, event after reinstalling Python.
I want to remove everything related to the previous installation and start fresh, but am having trouble doing that. Any advice would be helpful.
Windows 10
Python 3.8.5 is the most recent version used.
Use pip list to list all package (from the old python the one you want to uninstall). Then copy all the packages and put the in a --requirement file with all the packages installed in it. (how to specify --requirement file) Then use the following command to uninstall all the old packages.
pip uninstall [options] -r <requirements file>

Why creating Anaconda environments is taking forever

I'm interested in using a nice script from GitLab:
https://gitlab.com/RBP_Bioinformatics/mustard
Now the author already describes nicely the requirements and dependencies of the script, however, I really get tough time trying to creat an environment via conda
$ conda create -n py27 python=2.7 anaconda
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working...
now it has been solving the environment forever now, and I seem not to be the only one suffering,
honstly, I think that PIP and VENV are still the best, and I can't understand the use of a script when I must understand all the dependencies and packages to run it one single time, it would have been easier to write it from the beginning!
also I think when a script has so many dependencies, efforts should be done to compile that , that's why compiling is for,
anyway, I will need help in creating an environment using conda without waiting for 6h or more ..
I must be doing something not smart, and I don't want to work hard!
thanks if you decide to help!
Consider trying
conda create -n py27 python=2.7
without the anaconda at the end.
If you still try to create the environment with a file say requirements.txt, as I tried... I was having an issue where Anaconda Navigator will stay loading the file forever, with no errors. I ended up creating the environment using the following command.
Hope this works for any OCD person like me that was trying to learn how to create an environment from the requirements.txt
(MAKE SURE THE FILE IS IN THE SAME DIRECTORY)
conda create --name my-env-name --file requirements.txt

Resources