InvalidArchiveError when executing conda install notebook - python-3.x

I have conda 4.8.1 running on windows 10 enterprise edition and it is showing me following error whenever I try to install notebook.
InvalidArchiveError("Error with archive D:\\Miniconda3\\pkgs\\notebook-6.0.2-py37_0ujelie94\\pkg-notebook-6.0.2-py37_0.tar.zst. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nCan't create '\\\\?\\D:\\Miniconda3\\pkgs\\notebook-6.0.2-py37_0\\Lib\\site-packages\\notebook\\static\\components\\MathJax\\extensions\\a11y\\invalid_keypress.mp3'")
I have tried different versions of notebook and reinstalled anaconda and miniconda many times. Nothing seems to work.

I had the same problem on Ubuntu 18.04, I used conda clean -a and then it works perfectly.
Actually what conda clean -a does is cleaning the compressed .bz files and deleting older versions of package folders and does nothing to the new ones.
P.S.: Make sure you installed Anaconda or Miniconda into a directory that contains only 7-bit ASCII characters and no spaces, such as C:\anaconda!

Related

Uninstall Anaconda Completely

I uninstalled anaconda since I was having issues creating environments. I did this using add/remove programs (windows) but now there seems to be some files left. And it's not possible to install anaconda in the same location. Any ideas on how I can remove the remaining files so I can reinstall in the same location (i.e c:/users/imantha)

How to fix : Prefix "100" in front of all Anaconda packages

There is a prefix of "100" in front of all my python packages in anaconda navigator. I believe this is making it difficult for applications to use these libraries. For example, I cannot open Spyder.
Packages will be listed as "100 numpy" rather than simply "numpy"
I was in the middle of creating a virtual environment seperate from the root folder but I was doing a few install / uninstall of different packages using both Navigator and Anaconda Prompt. Suddenly just about everything with my python installation started having problems. After closing Spyder I have not been able to reopen it. I tried spyder --reset which did not work. I've tried several complete reinstalls of Anaconda and each time my root installation (as well as any other venvs I create) have a prefix of 100 in front of the package name.
I would expect the packages to read "numpy" rather than "100 numpy" etc.
I have also experienced this issue. For me, this occurred after running conda update --all in the anaconda terminal. I was able to fix this by rolling back my conda version to the version prior to my update that broke it.
To do this, go to anaconda prompt and type in conda list --revisions to find the revision number prior to whichever update broke anaconda. They you just type in conda install --revision #, replacing "#" with the revision number.
The same happened to me, however, it didn't affect Spyder. It occured after I added the conda-forge channel. After updating all packages using conda update --all, all packages were updated from the conda-forge channel.
I fixed this by removing conda-forge from my environment's channels and updating all packages using above command, which actually 'downgrades' a lot of packages that were more recent in the conda-forge channel. You can do this, by using:
conda config --remove channels conda-forge
afterwards, do
conda update --all
If this is your problem and you want to keep conda-forge because the base channel doesn't include the desired package, appending it to your channel list should work, instead of giving it highest priority, by using
conda config --append channels conda-forge

Spyder failing to launch - “could not find or load the Qt platform plugin windows”

I've recently had to do a fresh install of windows and reinstall all the software I was previously using including anaconda.
I still have all the data from before the reinstall. To save me from pip installing all the packages I was using, I thought it would be easier to copy and paste the environment info from pre windows reinstall (left image) into the environment folder of the freshly installed anaconda (right).(Information/Folders in question)
I'm getting this error message when I try to launch Spyder.
Juypter notebook seems to be working fine but I get the error shown when I attempt to launch Sypder in the 'imported environment' TensorFlow1.8CPU.
Can anyone tell me how to resolve this?
I'm also open to hear any other ways of importing the environment from pre windows install anaconda folder.
I solved this problem by installing spyder with a lower version.

Anaconda installed without conda.exe

I had missing conda.exe in Continuum\anaconda3\Scripts folder, so conda command doesn't work. This is not PATH problem. After that I have uninstalled anaconda, rebooted and installed just downloaded last version of anaconda. Installation was without admin rights. After that I still have conda missing in that folder.
What can I do? Is where a way to install conda eventually? Is it better to open an issue?
Windows 10, anaconda 5.01
PS I have previously installed Anaconda. Which I believe was installed with admin rights to whole users. Can it cause such problem?
I had the same issue in installation.
Issue: anaconda.exe file not found
Solution worked for me : Installed with admin rights and anaconda.exe was found in installation folder and startup menu.
Status : Resolved
There have been multiple reports of incomplete Windows Anaconda installations with Anaconda v5.0.1. There is a current workaround that you could try to see if this resolves the problem: https://docs.anaconda.com/anaconda/user-guide/troubleshooting#cannot-open-anaconda-prompt-after-installation
Uninstalled and installed with miniconda. Then installed with conda Anaconda, everything is fine now

Install OpenCV correctly on macOS Sierra

I am running on macOS Sierra and I have python 3.5.2 installed on my system.
Now I want to use opencv with python. So here is what I did :-
Installed XCode
Installed CMAKE
Downloaded opencv 3.2 and extracted to my Document directory.
Created a new directory called build inside my opencv directory in Document (obtained from step 3)
Opened CMAKE and configured it to run with source as the opencv directory in Document and target as the build directory within it.
Ran the "make" command from "build" directory
Ran "sudo make install"
All these steps completed successfully. Now I go to IDLE 3.5.2 shell and do "import cv2" and then I get the error "ImportError: No module named cv2"
I tried other solutions like pip3 install opencv-python. It removes the import error but I cannot use this because it doesn't support cv2.imshow() (I kind of need it).
Please help me install and configure opencv correctly.
If you are still stuck you can try by brew, did a fresh install some weeks ago and here is the full process.
As opencv cant support python2 & 3 by default install (read further)
brew edit opencv3
in formula edit this part:
if build.with?("python3") && build.with?("python")
# Opencv3 Does not support building both Python 2 and 3 versions
odie "opencv3: Does not support building both Python 2 and 3 wrappers"
end
by commenting it out ( # at start line).
then:
brew reinstall opencv3 --with-contrib --with-python3 --HEAD
if you have cmake.downloader error you need to edit the brew call and remove the --HEAD flag.
This error is just du to a file missing in the head repository (might be fix soon or not).
Also check your site-package/python version
One issue I found was with then name of the .so library created on install. Try renaming it to cv2.so instead of the longer name it starts with.
On my system it's found here:
/usr/local/opt/opencv/lib/python3.6/site-packages
Also, you can confirm that the above site-packages folder is accessible via sys.path.
>>> import sys
>>> sys.path
If not, you can create a .pth file in one of those directories that contains simply the path name of your site-packages folder above.

Resources