Installing Anaconda on a Secondary Drive (Windows) - python

I'm running Windows 10 Home, and I recently downloaded Anaconda because I wanted to be able to use Spyder, and wasn't really anticipating how much storage space it would take up, so I had to uninstall it.
However, my computer has two hard drives--a 100gb C:/ drive that windows boots off of and a much larger D:/ drive meant for storage. A lot of anaconda's largest files seem to be saved to C:/Users/[User], which is still on my C drive. And taking up space that I don't really have to spare.
Is there a way to tell Anaconda during installation (or initial run, possibly, it looks like) that it should save those files somewhere else? One of the environment variables, maybe?
If not I guess I'm open to suggestions for other Python IDEs that are smaller or can be put entirely on a secondary drive.

If you only want to work with spyder and not the rest of the software that comes bundled with Anaconda, you can just
pip install PyQt5
pip install spyder
Here is a guide for installing Spyder.

Related

Tensorflow installation issues

System information
OS Platform and Distribution - Windows 10
TensorFlow version: latest
Python version: 3.6.4
Installed using virtualenv? pip? conda?: - virtualenv
Greetings,
I hope this is the correct place to submit an inquiry of this nature, if it is not, please forgive my confusion & please point me in the right direction. I greatly appreciate your time & consideration.
I am new to Python & Tensorflow. I've done some coding with C in the past, mostly when I was in college. I am determined to learn Python & to utilize both Python & Tensorflow for AI & Machine Learning purposes.
I've had difficulties in getting Tensorflow to install properly. I started by installing the latest version of Python which didn't seem to like my attempts at installing Tensorflow, I then went with Python 3.6.4-amd64. I installed that, created a fresh directory for my environments, then installed pip & virtual env, then created a virtual environment to setup with Tensorflow.
One of the confusing issues I keep encountering is that when I install pip & virtualenv, and eventually Tensorflow, it keeps sending it by default to C:\user\username\appdata\roaming\python etc, my question is, how do I prevent it from doing that? I am trying to install in the direct being utilized in the command prop, I call up the fresh directory I created for my virtual environment, then activate the virtual environment, and no matter what I do it keeps sending all new install files into the appdata/roaming user directory sub folders.
This is causing the incredibly annoying issue of making it impossible for me to proceed with utilizing Tensorflow because I get nothing but errors on missing files, path directory etc etc. I even tried manually moving some of the files over to the virtual environment directory and that worked in some cases, but did not solve the overall problem.
Okay, now that I've made it painfully apparent how much of an uneducated newbie I am with all of this, may someone please give me some advice. The first step is admitting you need help, and I clearly do as I've spent several hours with my eyes glued to various articles and tutorials that have left me with more questions than answers. I truly appreciate any help you're willing to provide. Just a loner trying to figure this all out & increase my knowledge along the way. Thanks for your time,
Just moving the folder is not enough.
Once you have moved it, you must replace the original with a symbolic link to the new location. This will make windows think the data is still located on your C drive, while it actually is on your D drive.
Do note, this does work with AppData, but not with Program Files nor with the Windows folder, as it will break things like Windows Update.
To create the Directory Junction (Symbolic Link) do the following:
Open a cmd window with administrative privileges.
Navigate to c:\Users\username\appdata
execute the following command: mklink /d local d:\appdata\local
replace d:\appdata\local with the actual path of where you moved the appdata to.
If you cannot move/delete the original copy, create a 2nd user, make it administrator, login with it, and retry the option. This should ensure that no files are in use.
With the above issue fixed, follow the tensorflow installation steps in Anaconda provided here.
Hope this answers your question. Happy Learning.

Anaconda installation get stuck at extract: anaconda-2020.02-py37_0.tar.bz2?

I am new to python. I am installing Anaconda 3 2020.02 (64-bit) on my windows 7 laptop. It get stuck at file name as anaconda-2020.02-py37_tar.bz2
I tried multiple time but it's happening everytime
I met the same problem. I tried to install an previous version of anaconda from
https://repo.anaconda.com/archive/
It downloaded and installed "Anaconda3-2019.10-Windows-x86_64.exe" and it works.
I just did it. It does not get stuck, it just takes a veeeeery long time to extract (like 10-15 mins). the final size of the Anaconda folder is 5.4 GB, that is probably the reason why.
I had this issue for a while and just tried #wizu recommendation. It worked. I was able to install Anaconda3 2019.10 successfully. I think this is specifically a issue with the 2020.02 release.
I had faced the same issue as well on my Windows 10 desktop. All I see is lots of idle conda processes in Task Manager and the installer stuck on anaconda-2020.02-py37_0.tar.bz2. Extracting the anaconda-2020.02-py37_0.tar.bz2 file with 7zip while the installer was stuck did not help.
I solved the problem by running the installer on a separate Windows 10 machine which does not have trouble running the installer. I then moved the Anaconda3 installation folder to my problematic machine.
Now this does not normally work and anaconda highly recommends installing by running the installer instead of transplanting the folder. But we can hack it to work (as far as I have tested) by doing the following:
1) Using a program, search through every text file (.cmake, .txt, .sh, ..py, .pc, .prl, .conf) for string instances of the old full path to Anaconda3 on the original installation directory and replace them with the full path to the new Anaconda3 installation directory.
Some paths may use double backslash \\, single backslash \, forward slash /
or even a mix of them. Be careful to handle all these cases.
2) Some numpy related text files may contain paths to C:\Program Files(x86)\IntelSWTools\compilers_and_libraries_2020.X.XXX\.... Be sure to change this path to the available intel accelerated libraries on the new machine.
Additionally, copy over the start menu program shortcuts (found in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Anaconda3(64 bit)) to the same location on the new machine. Right click on each shortcut file to change the target path.
If the transplanting worked, on the problematic machine you should be able to launch Anaconda prompt from the Start Menu, launch spyder, and subsequently run numpy functions.
This is a hackish solution. But until we can find the root cause of the installation issue this is the only way I can install Anaconda-2020.02. I am waiting to see if there are better ways to fix this problem.

How to avoid anaconda from installing files/packages in C drive?

If you are using anaconda, then you probably noticed that when installing python packages, it took away the disks in C drive even if you installed anaconda in D drive. (I have tried the clean ect. of conda commands, it's not the cashes or other things but rather useful files.)
This was especially obvious when I was trying to install different versions of tensorflow and Keras packages. It took away almost 20 GBs of disks from my laptop.
My question was how to avoid such issue and make sure anaconda was only using the disks in, i.e. D drive?(in windows environment )
try changing the paths of the environment variables

Portable Python Installation

I'm trying to figure out the best way to install Python for my setup.
I travel between school and home every day and I use a 2TB Portable Drive for my files.
The computers at school are locked so that you cannot install there, but I bet I can install things on my drive and use them fine, as well as use portable applications just fine.
I was looking into ways of getting Python on both my drive and my computer so that my Python on my main computer will always work and my drive's Python is available when I want to work with it.
Of course, the problem is that Python won't install like that. It bricks either installation first, and I saw a post on virtualenv, but it seems like it's more of a project by project based solution for isolating imports/modules of sorts.
I'm not too good with this stuff and installing tons of programs and waiting for them to uninstall only to not figure it out isn't my thing, so maybe someone on here knows what I'm talking about? Thanks.
By the way, yes, I want both installations to have the same pip stuff, the portable one I currently use at school is having a rough time installing things like json, requests and other fun stuff that is essential to my scripts.
I presume your OS is windows.
Try to use cygwin (a linux emulator) that will allow you to install whatever utility you need on the cygwin installation directory (in your case would be your thumb drive). Launching than cygwin from your drive, you have a working environment for pretty much all the things you can imagine. If you export DISPLAY to your windows, than you can have GUI utilities, too.

Can't open python, possibly because of viruses

I use windows 7 and I've had problems with viruses. Using eset nod 32 and malwarebite anti-malware I've managed to clean everything up. But now I can't open Python (neither Spyder nor ipython notebook...). Nod 32 tells me that there are some files that are damaged and can not be open in anaconda.
I've tried uninstalling and reinstalling python, and googling my issue hasn't turned up anything. Has anyone else had this problem?
Remove previous installation of python, download the latest, install and attempt to launch python again.
https://www.python.org/downloads/
It could be that your anti-virus is false-identifying some python files as malicious, or perhaps you aren't installing python as administrator.
Perhaps python isn't on your path.
What happens when you open up your cmd.exe or powershell.exe program and run
python
How did you uninstall python? By deleting the folder? Don't do that, there may be other data from it on your computer. Instead, go to add or remove programs and uninstall it from there (may be slightly different on Windows 7 beecause I am using 8.1)
Now, with your viruses, I would suggest that you take a hard drive and save the folders that you KNOW do not have viruses. This means folders that you made yourself, not ones that another application made for you. Back them up, then restore your computer to factory settings. This should erase all the viruses.

Categories