I'm trying to use conda-pack to distribute a conda env to a different offline machine.
Following the steps at https://conda.github.io/conda-pack/ results in most things working (e.g. python, ipython, importing modules).
However, Spyder is not working. When I launch spyder from command prompt it says
This application failed to start because it could not find or
load the Qt platform plugin "windows" in "".
I looked into some related discussions like Qt 5.1.1: Application failed to start because platform plugin "windows" is missing however I have not found a fix.
I haven't found a solution to fix the real problem.
I wanted to try to use conda to install to see if I could fix it.
So I used conda to clone the broken environment so I could work with this cloned copy of the environment. For sanity, the first thing I did after cloning the broken environment was to try to run spyder from command prompt. Somewhat surprisingly Spyder worked!
Apparently creating a clone of the environment fixed the problem!
I imagine this might work for other conda users that see the message
This application failed to start because it could not find or
load the Qt platform plugin "windows" in "".
even if they were not using conda-pack.
Related
Brief description of the situation:
We have some image analysis workstations running Windows which I can book on an hourly basis. When I log in, my user account is loaded from the domain and my network drives are automatically mounted.
I'm now looking for a way to install python on these workstations in a manageable way, meaning:
each user would want to use their own set of packages and dependencies
users should have access to their packages and dependencies regardless of which specific workstation they booked.
for safety/maintainability, users are not allowed to install anything on the systems
users packages cannot be maintained centrally
After a bit of googling, I came up with the following workflow:
Install a vanilla anaconda on each of the workstations for all users. This will be updated/maintained as the need arises. In order to give the users flexibility, they would install one/several conda environment(s) on their network drives.
I started testing:
Everything seems to work fine on the PC I used to create the environment using
conda create -p Z:\path\to\env\my-env python=3.7 anaconda
conda activate Z:\path\to\env\my-env
pip install somepackages
conda install somemorepackages
I can run code from ipython, jupyter notebook ...
On a different PC however, I run into issues:
I added the network path using conda config --add envs_dirs Z:\path\to\env. I am able to activate the environment using conda activate Z:\path\to\env\my-env. I can also import packages that are installed in the environment, but not in the base anaconda (I tested with napari).
However, with some other packages (dask_image.imread) I get an error message:
WARNING: This application failed to start because it could not find or load the Qt platform plugin "windows" in "".
Reinstalling the application may fix this problem.
My question is now two-fold:
am I choosing the most feasible way? If not, what should be done differently?
if it's the best way, how do I fix the error message? I am guessing that the created environment is missing some dependency or path because I'm executing on two systems. When I google for solutions, it's mostly users trying to install into folders with non-unicode characters, so not helpful.
Windows ...
the PCs were setup by IT such that the assignment of the drive letters is somewhat arbitrary.
So activating the environments works, but then the absolute paths written within the environment point to a non-existing location (now also the error message could not find or load ... in "" makes much more sense - python is trying to load a dependency from a path which does not exist).
Workaround (for now): I'm making sure that the drive letters are consistent, then everything works.
I'm going to test if it's possible to install environments with relative paths, because this should solve the issue all together.
I ran 'conda install pandas-datareader' in Python to get the data.
A EnvironmentNotWritable Error has appeared, as shown below.
I suspect it is due to the (read only) option in base environment, but I do not know how to fix it.
I have just started Python and have little knowledge. I hope you can help me.
I do not know if it's necessary, but the version is like this.
active environment : None
conda version : 4.6.11
conda-build version : 3.17.8
python version : 3.7.3.final.0
base environment : C:\ProgramData\Anaconda3 (read only)
i ran this code
conda install pandas-datareader
During the installation of the package, the following error message appears.
....
Preparing transaction: done
Verifying transaction: failed
EnvironmentNotWritableError: The current user does not have write permissions to the target environment.
environment location: C\ProgramData\Anaconda3
Note: you may need to restart the kernel to use updated packages.
There can be two simple issues due to which this issue is generated--
* During installing library your Anaconda program is running. This restricts you to make any changes in environment during working.
Solution-1 Close Anaconda program then try installing library on command prompt.
Solution-2 Close Anaconda program then run Anaconda Prompt as Administrator.
I Hope this will work for you.
Please check the environments tab in the Anaconda if the problem persists after you run it with administrative privileges. in the Environments tab you can create new Environments, just hit create. For example, I created special environment for Rstudio. Whatever you like.
P.S. I checked conda install pandas-datareader on the fresh Anaconda installation and it works. So double check the Environments tab what you have there and install it with administrative rights.
I know I'm replying very early to your question, but still the solution that worked for me is to just run your anaconda prompt in administrator mode.
I just installed Anaconda3.7, 64 bit for windows. I used Anaconda Navigator to launch jupyter notebook. The notebook opened, but when I try to launch a kernel/notebook I get the following error:
The code execution cannot proceed because python37.dll was not found. Reinstalling the program may fix this problem.
I even tried launching jupyter from the command prompt and the anaconda prompt but it doesn't work. In those cases, jupyter tries to restart the kernel 5 times and just quits after no success.
I have the python37.dll file inside the Anaconda3 folder next to the python.exe and I tried adding python37 to PATH, but nothing helps.
Any clue what might be the problem?
I solved the issues by doing 2 things:
I uninstalled Anaconda and deleted all hidden files and folders that had to do with conda, anaconda, jupyter and python that were created recently.
I disabled the antivirus and firewall while installing (it appears that they were blocking some dll and Anaconda files from being installed correctly).
I reinstalled Anaconda
I had the same problem with the firewall after installing anaconda. I tried creating a virtual environment with "conda env create -f "environment.yml" but it never completed the creation until I disabled the firewall and antivirus.
I hope this helps others with similar issues.
Errors related to python37.dll can arise for a few different reasons. For instance, a faulty application, python37.dll has been deleted or misplaced, corrupted by malicious software present on your PC or a damaged Windows registry.
For anaconda its caused due to pip installing library into anaconda environment instead of using the conda package manager.
So you can download a python37.dll file online and move it to you anaconda directory which should solve the issue.
Check this anaconda issue might be related
https://github.com/ContinuumIO/anaconda-issues/issues/1394
Hope it helps.
I have downloaded Anaconda3 for windows 64-bit operating system. After the download and install completed, I opened the Anaconda prompt but it give me this nice error:
'C:\Anaconda3\Scripts\activate.bat' is not recognized as an internal or external command,operable program or batch file.
I just surfed the internet and found a solution to uninstall all previous packages of python but did not work. I have searched for activate.bat file in my system " found it in one folders of anaconda directory " and copy, paste it to the Scripts folder but it gives me errors with conda packages and dependencies. Any solutions please!!
I cannot run any either jupyter notebook or conda as well. Actually, I do not know how to find them in those bunch of Anaconda files and packages.
Thanks in advance,,,.
This is a known Anaconda bug:
From their Github:
" I have fixed the underlying bug here but we will not release new Anaconda installers for a while.
The fix is in the latest Miniconda installers:
64-bit:
https://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86_64.exe
https://repo.continuum.io/miniconda/Miniconda2-latest-Windows-x86_64.exe
32-bit:
https://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86.exe
https://repo.continuum.io/miniconda/Miniconda2-latest-Windows-x86.exe
Install those, then run the Anaconda Prompt and install whatever packages you need. If you want the latest full Anaconda release then use:
conda install anaconda=5.0.1"
Check this github thread for the full answer: https://github.com/conda/conda/issues/6053
When you installing Anaconda3 on Windows 10 and the Anaconda Navigator menu item does not install, and running the Anaconda Prompt gives the activate.bat error.
Delete all instances of the previous python IDEs
Reveal hidden files within the control menu
Go to -> C:\Users[Username] in windows explorer
Delete the files .conda and .anaconda. Possibly others if you had other IDEs.
Go to -> C:\Users[Username]\AppData\Local
Delete all python related files conda, python, ect.. any instances other python IDEs
Go to -> C:\Users[Username]\AppData\Roaming
Delete all python related files conda, python, ect.. any instances other python IDEs
Run the Anaconda installer as Admin and install in a directory such as C:\anaconda3
Sit back and wonder why an install took 4 hours out of my life and start drinking.
At some point I felt like this was a test for the uninitiated... can I start coding now?
I think the problem will be solved by clearing all dependencies. I initially had python installed, 2.7 and 3.6. I just get rid of all of them. The problem is not solved yet.
I discovered that My MySQL server is running. I just closed it but it did not work. I just uninstalled it completely and The problem is solved. Anaconda needs to listen to , I think 8888 port, which might be used also by MySQL server as well.
I hope this will help.
I had the same issue and solved it like this:
Open a command prompt (cmd.exe)
Execute these commands to reset two environment variables:
set PYTHONPATH=
set PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
Start the installer (from within the same command prompt).
Now the installation will succeed!
Tip: if 'Anaconda Prompt' in the start menu isn't working afterwards, use this workaround:
C:\Users\<username>\AppData\Local\Continuum\anaconda3\Scripts\activate.bat C:\Users\<username>\AppData\Local\Continuum\anaconda3
I solved it
If you install other python directories or install anaconda on your drive. remove them all
and visit to C:\Users\<username> and you can find this babies
.anaconda
.conda
Kill them all, reinstall anaconda.
Now it works well.
I uninstalled any previous versions.Restarted system and installed Anaconda again at path C:\Users\xyzuser\Anaconda.It is working now
I solved it with:
0. Rename/delete previous Anaconda3 directory (at c:\ProgramData\Anac...) (show/check hidden items at File Manager to delete it)
1. Re-install Anaconda
2. At Advanced Installation Options, I check both:
2.1. [check] Add Anaconda to my PATH environment variable
2.2. [check] Register Anaconda as my default Python 3.6
3. then click Install button
4. Done
my OS: windows 10, 64bit
I have met exactly the same problem when I was using anaconda 5.3.1 on windows10.
Well, the solution is to uninstall your anaconda and re-install it.
And when you install anaconda, you can't close the exe command window manually which would show up at the end of installing. You should let it run and exit by itself. Only by this way your anaconda would be installed correctly.
The Fix is simple. Here's what you need to do.
Go to--
C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\Scripts\
*Replace USERNAME with your own***
If you are not able to access this location, then directly search in your C drive for Continuum, and from there you can write the rest of the URL
Search for "Activate.bat"
If you are able to find this file, then go to ANACONDA PROMPT and
Change your directory by typing:
cd C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\Scripts\
*Replace USERNAME with your own***
Your directory is now projecting to this new location.
Now type:
activate.bat
Hit enter
Now you activated your Anaconda.
Now, you can check if it is working or not by typing
Conda list
I had Anaconda version 3.5 installed on my machine but I decided to uninstall it (via the control panel) and to download version 2.7 instead. I am using Windows 7.
However, I have an error message towards the end of the installation where I receive a pop up window saying: Failed to create Anaconda menus and then another one saying Failed to add Anaconda to the system PATH.
When I click ignore on these pop ups the installation is finished but I do not even see Anaconda in my start menu.
I used different installers (4.2.0 and 4.1.1) but it still not working.
I tried to install it for all users (as I read on the Internet) but it still did not work. The error message was different (see link below) followed by the pop up Failed to create Anaconda menus.
https://cloud.githubusercontent.com/assets/24353213/20858712/e4438f60-b94b-11e6-806b-f01436aac306.PNG
Can you please help as I am stuck and cannot use it at all?
2.5 years later, I had the same problem installing v2019.07, but the version actually doesn't matter. Anaconda has had this bug in the installer for a long time.
2019.07 successfully installed on one of my dev boxes
2019.07 failed to create menus on a second dev box with a very similar environment. Both Anaconda and Miniconda failed. I tried everything in this thread, and then some.
Finally I went to the download archive and grabbed 2019.03, which installed with no issues. This fixed it for me, your mileage may vary.
I was able to install from Windows Safe Mode. There were no errors during the installation.
I almost spent two days running in circles trying all the solutions I could find on the Internet, but here is what worked for me.
So, CondaHTTPError aka SSL module is not available error is caused by the missing/misplacement of libcrypto file in anaconda3/DLLs folder:
Tl;dr:
From anaconda3\Library\bin copy below files and paste them in anaconda3/DLLs:
- libcrypto-1_1-x64.dll
- libssl-1_1-x64.dll
Detailed answer:
Uninstall any Python versions you have (e.g. Python 3.7 or Python 3.8)
go to Control Panel--> Program and Features--> Select Python-->
uninstall
Uninstall any Anaconda versions you might have (e.g. Anaconda or miniConda)
For Anaconda:
go to Control Panel--> Program and Features--> Select Anaconda-->uninstall
For miniConda
go to Control Panel--> Program and Features--> Select miniconda--> uninstall
Delete any leftover Environment variables
go to Control Panel--> System--> Advanced System settings (on left side)--> in System Properties click on Environment Variables button--> in User Variable select Path and click the Edit button--> delete any path related to Anaconda, miniConda or Python.
E.g.
C:\Users\Bob \AppData\Local\Programs\Anaconda\...
C:\Users\Bob \AppData\Local\Programs\miniconda\...
b. If you don’t see any paths related to Anaconda, miniConda or Python; you are good to go.
Reboot your machine
Download the latest version of Anaconda
Run the Installer; keep all the default settings
Go to your anaconda3/library/bin folder:
E.g.C:\Users\Bob\AppData\Local\Continuum\anaconda3\Library\bin
Copy these files:
libcrypto-1_1-x64.dll
libssl-1_1-x64.dll
paste these in anaconda3/DLLs folder:
Reopen the Anaconda Prompt and test with any command that requires an Internet connection.
E.g.
conda update conda
Or with
conda update --all
I was also facing the same issue while installing Anaconda 3.5, please follow the steps below before you start installation :
Delete old Python versions from your PC/Laptop
Clear path variables which have created on your PC
Turn off your anti virus program before you start installation
If you have JDK installed on your machine, uninstall it, also delete JAVA path created in variable
Could you try choosing run as administrator before clicking Anaconda 3 installation? That fixed mine.
Tried this as well, using 5.0.0 and 4.4.0 installer, tried as local user, admin user, install as administrator, clicked the "add to path", but none of these worked. Every time I got the same "failed to install menus"
Then I added the Anaconda target directory C:\ProgramData\Anaconda3 to the end of my Path, re-ran the installer (5.0.0) and it finally worked.
This is complete process. With this step you cat install your Anaconda of any version(not need to download miniconda).
If you are window user or any OS you are using first download Anacond.
first you need to delete all language(java,python etc) variable path which is set via environment variable.
If you are window user then need to off window defender.
After that uninstall all antivirus software(If you using antivirus software you will not get menu ).
And install Anacoda you can install perfectly.100% working
Turn off the antivirus installed in your computer before installing the anaconda setup.
During installation select its access to all users which requires admin permission then the default path automatically changes into C/Program Data/Anaconda 3.
Then it won't show any errors :)