I was doing something & I messed up everything. Now if I type conda in terminal and it says zsh conda not found
Here's my .zshrc file
alias python='python3'
# added by Anaconda3 4.4.0 installer
export PATH="/Users/abhimanyuaryan/anaconda/bin:$PATH"export PATH="/usr/local/opt/opencv3/bin:$PATH"
I tried re-installing anaconda but it says it's already installed in my home directory consider upgrading anacoda and then installation fails
with a message that installer failed with an error contact manufacturer for assitance
Removed anaconda completely and reinstalled anaconda fixed this problem
I faced the same issue in my macOS Catalina, tried everything but nothing went on work, at last I found the way how to git rid of this error, just follow few steps and you will get an amazing result.
step one - press command and space, and type users on the spotlight search, type users, you will see your computer name click on it and in the upper search bar for searching folder files of the finder, type anconda (your version) and delete the folder.
step two - download and install it back but be careful in the step of installation when your are installing it for yourself, rather go for the disk and click on the disk then click on the change location and add the location of (Users/computer name/ ) and then install it, it's all done!, try this command conda --version , if it works it means you are able to work with conda, check your python version as well: by the command python --version .
Related
I have python 3.9 I used the command 'pip install auto-py-to-exe' and it downloaded but when I tried to using the command 'auto-py-to-exe' the program just said " 'auto-py-to-exe' is not recognized as an internal or external command, operable program or batch file.". I have the latest version of PIP and I also have PATH. What can I do to fix this?
This works on VSCode:
python -m auto_py_to_exe
If I install "auto-py-to-exe" using following command, as described in this link as well as from the comment from Justin Ezequiel (above):
python -m pip install auto-py-to-exe
I am able to run it (in Windows 10) using following command:
python -m auto_py_to_exe
This gave me quite a bit of trouble, as none of the above solutions worked for me. Spent lots of time trying to figure out what I should be adding to PATH with no success.
My issue stemmed from (I think) the fact that I have been using python downloaded from the windows store, which uses a different location to store python in.
With the manual install of python (https://www.python.org) you can specify where python is downloaded and automatically add that location to path.
Steps I took to solve the problem:
Uninstall all versions of python downloaded from the windows store via settings (settings > apps > python > uninstall)
Uninstall all version of python via the control panel (control panel > add or remove programs > python x.x.x > uninstall)
Uninstall auto-py-to-exe (pip uninstall auto-py-to-exe) in case it didnt do that automatically
Install python from python.org. (auto-py-to-exe is not supported in versions greater than 3.10 as of 1/23/2023). So I installed Python 3.10
The settings which were successful for me were:
Custom installation,
check install python for all users,
check add to path,
input 'C:\Python310' (with the respective version number) for install location,
install
Check new python version has been installed python --version
Check pip is installed pip --version
Install auto-py-to-exe pip install auto-py-to-exe
When auto-py-to-exe finishes installing, scroll up through the install info and make sure there are no warnings that state there is a location not found in PATH. If there are, you'll have to do some other research on adding those locations to PATH appropriately (since I don't think I was doing that right).
Assuming no PATH warnings,
9. Run auto-py-to-exe
First you need to type in the terminal (not Python):
auto-py-to-exe
If you are currently in python use exit() to exit then try the above code.
It Depends on in which environment you have installed
Make sure to replace {User} with your user
In Conda Enviournment go to below location Manually
C:\Users\{User}\anaconda3\Scripts\auto-py-to-exe.exe
In Pip, Environment go to the location below
C:\Users\{User}\AppData\Local\Programs\Python\Python37-32\Scripts\auto-py-to-exe.exe
or you can add this path to your environment variable as well for accessing these from anywhere
First check you installed it
pip install auto-py-to-exe
then restart your vscode and check another time.
If still an error, check it in CMD.
As suggested above use:
pip show --files auto-py-to-exe to find out in what directory pip has
installed the scripts. Double check the directory is in %PATH%
This will show you where the installer has placed the binary files. I then changed to that directory which circumvents any path issue. I tried to run the files and found :
OSError: [WinError 1920] The file cannot be accessed by the system: 'C:\\Users\\aaaa\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\\python.exe'
PS C:\users\aaaa\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\Scripts>
In my case, although I haven't worked out how to fix it yet... It would seem to be trying to refer to an incorrect Python executable, the files in that directory are all 0 length. Unfortunately the "python -m" suggestion didn't work for me, so it's back to the drawing board. Hope that helps you confirm if it's the right solution to chase down.
You need to make sure you have typed cd C:\Users\your_user_name\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts as a separate command, and then auto-py-to-exe with python 3. Check in file explorer to make sure your path is correct if the cd fails.
I am on a Mac. The terminal window doesn't seem to be able to access my bin or bash folder anymore, I'm not sure.
In the terminal window I am typing conda --version to determine which version of Anaconda I have installed but I get the message -bash: conda: command not found. - Also when I am in Atom, and am using the Python text editor and I'm trying to create a virtual environment, I type sudo conda create --name myDjangoEnv django and I get the same message, sudo: conda: command not found.
I used sudo because otherwise it would not let me set up a virtual environment without entering a password.
I think I edited the bash profile when I set up the virtual environment.
The thing is, I was able to do all of this yesterday, when I typed conda --version in my terminal I got the version of anaconda I installed, and I was able to update the version of anaconda. And in the python editor in Atom, when I typed sudo conda create --name myDjangoEnv django it set up a virtual environment. I was also able to update to the latest version of django.
Additionally, I had a new problem. In Atom I couldn't install a package. if I hit install a package, nothing would happen. Yesterday I was able to install packages. However I restarted Atom and now I am able to install packages, but I'm still having the problem listed above.
Does anyone know what is going on? I'm pretty new to all of this stuff. Should I reinstall Atom, Anaconda, django, and Python? Perhaps, I didn't install it to the right location? Is it easier to run all these programs on windows 10?
Atom is installed in /Users/myusername/Downloads
django: there's no .app for django so its hard to tell where its installed. Some of the folders for django are installed here:
/Users/myusername/newproject/newenv/lib/python3.7/site-packages
or another django folder's location is here:
/Users/myusername/opt/anaconda3/lib/python3.8/site-packages/bokeh/server
python: there are so many python folders, 1 python 3.8 folder's location is:
/Users/myusername/opt/anaconda3/pkgs/lxml-4.5.2-py38h63b7cb6_0/lib
Anaconda: /Users/myusername/opt/anaconda3
echo "$PATH" produces
/Volumes/myExternalDrive/opt/anaconda3/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
conda is installed in: /Users/myUserName/opt/anaconda3/pkgs/conda-4.8.3-py38_0/info/test/tests/test-recipes/activate_deactivate_package/src/etc –
Your PATH appears to have an incorrect component. Where you see
/Volumes/myExternalDrive/opt/anaconda3/bin
you should apparently have
/Users/myusername/opt/anaconda3/bin
At a terminal prompt, you can temporarily fix this with
PATH=/Users/myusername/opt/anaconda3/bin:$PATH
and at that point, you should be able to run conda --version and python3 in that terminal instance, until you terminate it.
The proper permanent fix is to find the place where this was incorrectly configured, and correct it there; probably your .bashrc needs a more thorough cleanup, but that's already far outside the scope of your original question.
(This assumes your home directory is /Users/myusername; the command echo "$HOME" should confirm this. That's where you'd look for .bashrc too.)
I would to create new Python project which include pipenv for manage my packages.
But when I try to install package with it, it throw me I exception :
ValueError: Not a valid python path:
'C:/dev/Anaconda3/Scripts/python.exe'
I try pipenv command with 2 differents emulation terminal (Cmder and Terminus) which produce same result.
In old time a try Anaconda solutions for work with Python. But now I don't want use this and I uninstall Anaconda in my OS.
It seems that my OS keep old reference to this python executable into Anaconda in your PATH... But I display my 2 PATH variables OS (PATH system OS and PATH user) and nothing has this location path into your string.
The directory c:\dev\Anaconda3 doesn't exist !
I try to search uninstall Anaconda program in my tool application manager Windows but Anaconda is not diplayed in that listing. It seems to be good uninstalled.
I install correctly pipenv executable : pipenv --version
pipenv, version 2020.6.2
I install correctly python executable : python --version
Python 3.8.3
I added 3 differents PATH python for my OS PATH (system PATH and user PATH) :
C:\dev\python\Python38
C:\dev\python\Python38\Scripts\
C:\dev\python\Python38\Scripts\bin
Why I keep old reference to Anaconda program ?
Why many program search python in same old deleted path and PATH variable do not included this ?
How pipenv created his PATH environment variable ?
I had a Python2.7 instance giving me the same problem. I copy/pasted its python.exe into the Scripts folder. So it now found a real python.exe there. Once I did this it continued on happily. And now I was able to use the Python3.9 version i wanted it to use anyways.
It seems like the python searcher should be a little more tolerant and just ignore poorly formed python releases. There is an open ticket for this: https://github.com/pypa/pipenv/issues/4334
I had a similar error because of an incorrectly uninstalled Anaconda. To see if you have the same problem, go to System Settings > Add or remove programs, and check for anything unexpected matching "conda". Trying to uninstall it results in an error because the uninstall.exe file cannot be found.
Searching around, I saw a few posts that said to mess with regedit, but that's scary. Instead, I re-installed the version of Anaconda that I needed to uninstall (you can do that with https://repo.anaconda.com/archive/Anaconda3-2020.02-Windows-x86_64.exe, replacing 2020.02 with your Anaconda version), and then uninstalling it via the proper uninstaller via "Add or remove programs". After a restart, the phantom Anaconda python was gone
You need to delete the old path in the Windows Registry.
Hit win + r
regedit
find folders with (Anaconda3 or Miniconda3).
Probably two folders. Do not delete folders with the new path to Python.
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 :)