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.
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.
No Python at 'C:\Users\~~~~\python.exe' error keeps coming out..
Even if I deleted my previous python and path, the file location is where I installed my previous python...
I want to use python in VS code and cmd on windows 10.
What I tried to fix it
deleted python 3.7 version and reinstalled python 3.6 version.
removed previous python 3.7 path and added python 3.6 version reinstalled to the Windows Path variable.
remove ';' on windows path variable.
put ';' on windows path variable.
delete and reinstall python on vscode Extensions
If you use venv, then look in that file:
pyvenv.cfg
The reason this happened to me was because I updated my python version. Therefore, the existing venv config was looking for an older python version. What I did was simply delete the existing virtual environment folder and created a new one.
To save all dependencies installed and transfer it into the new virtual environment, you can do the following:
pip freeze > requirements.txt to save dependencies into a text file
delete old venv folder
create new venv folder
pip install requirements.txt
First of all, make sure you have installed correct bit version for your version 32/64 bit...I would prefer to install python from Microsoft store...And restart VS Code...
If the error still exists try uninstalling and again installing Python extension for VS Code and restart VS Code...
And you can even try to install python in the path it is searching for... And also add the path to the environmental variable...
Hope this might solve your problem...as it has done mine.
I ran into this issue when having done the following:
I had Python 3.8 and 3.9 installed.
Installed Python 3.10.
Removed Python 3.9 and 3.9.
Set PATH property to contain the paths to Python 10 installation folder and its Scripts folder.
After this, Python stopped working from console and in IDE. When trying to add the Python interpreter to the IDE (Intellij IDEA) I realised there was no python.exe in Python 10 folder.
To fix this, I uninstalled Python 10 altogether and installed it again. It started to work.
Okay this should cover your issue. Firstly check whether it is installed
$ $(npm config get python)
or
npm --add-python-to-path='true' --debug install --global windows-build-tool
Moreover, do not forget to run your client interface as administrator.
More on this topic https://github.com/felixrieseberg/windows-build-tools/issues/56
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 :)
Trying to install Python 3.4.3 64-Bit and it gives me the following error:
'There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support or package vendor'
I have no bloody idea what this means so please help. Thanks in advance
I'm the admin on my computer and have all permissions
My windows is 64bit and is Windows 8.1
I had the same phenomenon occur when trying to clean up (uninstall various versions of Python and perform a clean install of 3.4.3) on my Windows 7 64-bit laptop. Unfortunately, I cannot tell you what "program required for this install to complete could not be run". Repeated attempts to "install for all users" produced the same "could not be run" (followed by a roll back of the install). Just before getting out Orca and diving into the innards of the MSI file, I attempted an "install just for me", and the install completed. I am, in fact, the only (human) user of this computer. There is another user account that was created during a cygwin setup, and access to some aspect of that user's profile/resources may have been the issue. If you are installing Python for your own use - and not as a "platform-wide" resource for other users as well - you might try installing "just for me".
For me the problem was that I had an older version of Python installed, that the MSI could not un-install. I had to manually remove it first.
This is how I resolved the problem on my Windows7 machine...
Open a command prompt and navigate to the location of the python.exe. (For me this was C:\Python34.)
Execute this command
python3 -B -m ensurepip._uninstall
Close the command prompt.
Using the python MSI file for the version of Python I had previously installed (yes, I went to the Python archive and downloaded the MSI for the old version), install Python again, but without the "pip" package. (Not sure if this is necessary, but it worked for me.)
Using the same Python MSI file, uninstall Python completely.
Using another MSI, for the version of Python you wish to install, you should now be able to perform a "clean" install.
I got the same error while uninstalling the python file from the control panel. It prompts
There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support or package vendor
I have solved this problem by installing the specific python-<version>.amd64.msi.
I then executed the MSI file. It asks for Change, repair, remove. First, click on Change radio button and complete execution. Later you can come to control panel and repair or uninstall the python file.
I had the same symptoms as OP. In my case, i had two separate installs, one of 2.7 and one of 3.4.3 and when i checked the PATH variable, there were 2 lines about PYTHONPATH pointing to the 2.7 version.
I removed the lines and then the repair funciton of the MSI did work. I uninstalled both versions and proceeded to reinstall.
Done :)
On a Win7 box:
Startup/ right click on Computer / Properties / Advanced system settings / Environment variables then check both sub-windows for paths related to python.
I had just the exact problem. But in mine case i've additionally removed the c:\python27 and c:\python36 directories and associated installers got stuck around Install/Uninstall and could not completely repair the installation (the /Scripts subdirectory has been missed and the python.exe reported an error about missed encodings module).
But i've found a solution for myself. Seems somehow the PYTHONHOME and PYTHONPATH environment variables (and may be PATH too) has been interfering with the Python installation process. But because i could not run Uninstall from the Windows Uninstall list in the Control Panel, then i did this:
Cleanup the PATH environment variable from all python path occurrences.
Remove PYTHONHOME and PYTHONPATH environment variables.
Restart Windows Explorer if environment variables (console command set PY must return the empty list) is not updated.
Run repair from (!) the python-3.4.4*.exe/python-2.7.11*.exe executables (download it if not done yet). Icons in the Windows Uninstall list in the Control Panel will reset into the original state for a repaired python installation.
Run the Uninstall from the same executables or from Windows Uninstall list in the Control Panel.
And it did the trick!
If you still needs the both versions of the python installation, then try install the older versions before the new versions. Seems it's important too.
Poking around, there is a temp file saying:
Error 1721. There is a problem with this Windows Installer package. A
program required for this install to complete could not be run.
Contact your support personnel or package vendor. Action: UpdatePip,
location: C:\Programs\PY272\python.exe, command: -m ensurepip -U
--default-pip
=== Logging stopped: 6/12/2015 13:26:17 ===
OK, so the missing "Voldemort" file (that which shall not be mentioned) is the ensurepip package. There is documentation for ensurepip at https://docs.python.org/2/library/ensurepip.html. I am still on 2.7, but it looks like this is a shared problem with Py 3.
The documentation says the ensurepip package is new in 2.7.9. My solution: install a version prior to 2.7.9 and then upgrade the files myself from an existing install. Done.