I've recently upgraded my PC with various bits and pieces and installed Windows 10 Pro. Most of what I do is data science related, but that's irrelevant.
I've had several issues with Anaconda 3 installations, my Path variables, installing various packages, and several Windows commands that I understood to be built-in:
Obviously, virtual environments are popular, and I've been using conda environments to run basic code without issue, however, several very key libraries are giving me issues when I try to install them. The first one I ran into an issue with was the very standard and presumably easy-to-install matplotlib, however, the issue I ran into here and am still getting is that chcp is not recognized as an internal or external command.... When I run where chcp as admin I have no issues. chcp will run without error as well, but as soon as stop cmd as admin, chcp nor where commands work whatsoever. I don't get it. I've done just about everything I can to the Path variable that I've seen online, and nothing has worked. Uninstalled and reinstalled. Nothing has changed.
Furthermore, isn't Anaconda supposed to come pre-installed with these?
note where does not return an error that would indicate that it's looking in the wrong directory; I get an exit code DNE 0 due to the command apparently not existing outside of admin privileges in \System32. Makes no sense to me and haven't found anything like this/ a vague resemblance of a solution elsewhere.
So with all of that in mind:
what might be causing this issue? Permissions? Locations? Something I'm missing from the Path variables? etc. Fixing the issue with chcp should do it for me.
How can I get the Anaconda "package" to, well, work? -> I can get the launcher, Jupyter notebooks, etc., but what I'm referring to here is the set of packages for Python itself -- that's why I went for Anaconda to begin with.
Thanks in advance.
Related
I was running a python program which uses CVXPY to solve a optimization problem involving semi-definite constraints. Initially the code ran well when I was using the default solver provided by CVXPY. Then I tried to use MOSEK as the optimization solver. Since it has to be installed, I tried installing it from command prompt using a pip installer. However the installation was interrupted midway (I am unaware of the specific reasons). Now whenever I am trying to run the code, it is prompting an error-
rescode.err_missing_license_file(1008): License cannot be located. The default search path is ';C:\Users\dsouv\mosek\mosek.lic;'.
I can understand that somehow the default search path has been changed due to the failed installation of MOSEK. Even after calling the default solver of CVXPY, I am still getting the same error.
Things I have tried:
Reinstalling CVXPY.
Reinstalling MOSEK from the Anaconda Powershell Prompt.
Even after trying out these, the error still persist. Any suggestions to solve this issue is welcome. Also please me if you need any other informtion.
Thanks
You should install the license file separately. I.e. do step 3 at
https://www.mosek.com/resources/getting-started/
I faced this silly problem since the last 2 days, and it turns me mad.
Since I installed python 3.9 on my new Windows 10 machine, when I run the command python3 -m venv .\venv, I get the error "Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases."
If I switch off the app execution aliases, as mentioned in the message, I got a message:
'python3' is not recognized as an internal or external command,
operable program or batch file.
So, I looked at similar issues on Stackoverflow and fixed the path in the environment variables (in the user variables and in the system variables).
I added to the variable 'paths' the 2 following entries:
C:\Users{myuser}\AppData\Local\Programs\Python\Python39
C:\Users{myuser}\AppData\Local\Programs\Python\Python39\Scripts\
In all cases seen on Stack, that should have been enough. Not in my case.
I rebooted my machine twice, to make sure the new variables were picked up, but it's still the same.
I must add that I am using daily my Jupyter Lab environment, and everything works fine.
It's just this venv that refuses to work.
Does anyone has a hint on other places I should look for ?
Solution found thanks to Michael Vine.
To summarize:
referring to python instead of python3 in the command line
using [virtualenv venv] instead of [python -m venv .\venv] as I did
I had configured VSCode for python, it was working fine, linter , autopep all the things were working fine. After some days I installed Anaconda, from here problems started, after this I got error that Select Python Interpreter at the bottom of VSCode, I added python path to the settings,then it works fine but "Select Python Interpreter" error was still coming. Some days before I installed Javascript extension, after this linter,autopep nothing is working,only using python command line python program is getting run.
I removed javascript extension,again installed VSCode, now the things are worst,nothing is working now.Please anyone help me to how to reconfigure VSCode to work properly.Even I removed Anaconda installation too, still problems not solved. I searched online but did not get any proper inforamtion.
I had a similar issue, I think you have both Python 3.7 and Anaconda installed separately, Use any one them , remove the other. When both of them is together it was throwing lot of issues. I would prefer to remove Anaconda(pure personal choice).If you don't have much customized settings in VScode, delete its user configuration files and set it up again. it will work
Update: Two months after posting this question, I switched to a fresh install of Windows 10 and was able to install the correct version of Anaconda Python. Unfortunately the answers came too late for me to test them.
I want to switch from the 32-bit version of Anaconda Python 3.5 to the 64-bit version. First I uninstalled Anaconda through the 'Programs and Features' window, then I downloaded the Anaconda3-4.2.0-Windows-x86_64.exe installer and attempted to run it. For reference, I am using the 64-bit version of Windows 7. After some initial processing the installer is stuck on Execute: "C:\Users\user.name\AppData\Local\Continuum\Anaconda3\pythonw.exe" -E -s "C:\Users\user.name\AppData\Local\Continuum\Anaconda3\pkgs\.install.py" --root-prefix "C:\Users\user.name\AppData\Local\Continuum\Anaconda3" --post root
It does not throw any errors, it just hangs. I let it run throughout the night to see if it would progress any further, but unfortunately it was still stuck in the same place in the morning. Afterwards I tried looking for hidden Continuum files from the previous installation and removed those - also removed Anaconda from my PATH variable. I even tried installing miniconda instead of anaconda, but both installers get stuck in the exact same place. Am I missing a hidden file somewhere which is causing the Anaconda installer to hang?
Below is part of the installation log up until the execution command where it gets stuck.
Installing: dill-0.2.5-py35_0 (into root)
untgz::extract -d 'C:\Users\user.name\AppData\Local\Continuum\Anaconda3' -zbz2 'C:\Users\use.name\AppData\Local\Continuum\Anaconda3\pkgs\dill-0.2.5-py35_0.tar.bz2'
Writing Lib/site-packages/dill-0.2.5-py3.5.egg-info
Writing Lib/site-packages/dill/__diff.py
Writing Lib/site-packages/dill/__init__.py
Writing Lib/site-packages/dill/__pycache__/__diff.cpython-35.pyc
Writing Lib/site-packages/dill/__pycache__/__init__.cpython-35.pyc
Writing Lib/site-packages/dill/__pycache__/_objects.cpython-35.pyc
Writing Lib/site-packages/dill/__pycache__/detect.cpython-35.pyc
Writing Lib/site-packages/dill/__pycache__/dill.cpython-35.pyc
Writing Lib/site-packages/dill/__pycache__/info.cpython-35.pyc
Writing Lib/site-packages/dill/__pycache__/objtypes.cpython-35.pyc
Writing Lib/site-packages/dill/__pycache__/pointers.cpython-35.pyc
Writing Lib/site-packages/dill/__pycache__/settings.cpython-35.pyc
Writing Lib/site-packages/dill/__pycache__/source.cpython-35.pyc
Writing Lib/site-packages/dill/__pycache__/temp.cpython-35.pyc
Writing Lib/site-packages/dill/_objects.py
Writing Lib/site-packages/dill/detect.py
Writing Lib/site-packages/dill/dill.py
Writing Lib/site-packages/dill/info.py
Writing Lib/site-packages/dill/objtypes.py
Writing Lib/site-packages/dill/pointers.py
Writing Lib/site-packages/dill/settings.py
Writing Lib/site-packages/dill/source.py
Writing Lib/site-packages/dill/temp.py
Writing Scripts/get_objgraph.py
Writing Scripts/unpickle.py
Writing info/LICENSE.txt
Writing info/files
Writing info/has_prefix
Writing info/index.json
Writing info/platform
Writing info/recipe/bld.bat
Writing info/recipe/build.sh
Writing info/recipe/meta.yaml
extraction complete.
Execute: "C:\Users\user.name\AppData\Local\Continuum\Anaconda3\pythonw.exe" -E -s "C:\Users\user.name\AppData\Local\Continuum\Anaconda3\pkgs\.install.py" --root-prefix "C:\Users\user.name\AppData\Local\Continuum\Anaconda3" --post root
I simply ended all python processes (any stale anaconda install/uninstall process running) and deleted all directories created during previous installation attempt. Then I could install without trouble.
If above effort does not work, check the environment path variables. It should not include any python path.
I have ended pythow process from taskmanager and removed unnecessary/irrelevant from environment path. It resolves my issues.
Try this, it worked for me:
conda install python=3.5
conda install tensorflow
Temporary disable antivirus and then try.
For me the installation was extremely slow, especially during the "unpacking" phase. After I disabled the "Real-time protection" under "Virus & threat protection" - the installation continued much faster.
I solved this issue by doing the following:
The installation was stuck on "extracting: anaconda-2020.02-py37_0.tar.bz2".
I went to https://anaconda.org/anaconda/anaconda/files and installed that file manually.
I extracted that file in the anaconda folder and it was all good!
As mentioned by ClaraJacintho in https://github.com/ContinuumIO/anaconda-issues/issues/6258#issuecomment-565063685:
I found that the "security module" called Warsaw (or GAS antifraud), used by many banks in Brazil for internet banking security, was interfering with the installation. I uninstalled it and was able to install Anaconda3.2019.10 64 bits on my Windows 10 machine.
It worked for me.
I am working with multiple versions of Python, so I don't want to put any one of them in my windows path. I discovered that I can create a virtualenv (under Settings -> Project: X -> Project Interpreter and that will allow me to specify which python exe to use, but also where to get other useful programs, like pip. The end result is that using Virtualenv I can type "pip" or "python" in the terminal in Pycharm and use it as a regular terminal.
But now I'm working with Anaconda so I don't want to use virtualenv and I want to use conda instead. This works fine, but it doesn't seem to put anything into the path. (This is particularly important because where I intend to keep my project is not near my path to the python environment conda created.)
So if I type "pip" or "python" in the pycharm terminal, it doesn't recognize them. I have to specify a huge path to get it to work right.
I've been googling around and trying to find a solution to this problem. I've found a number of supposed solutions, but so far none have worked.
So, for example, I've already tried Add Content Root under project structure. This does nothing. I've tried add local, which seems to just screw everything up. (Presumably this is a way to create a local environment that I shouldn't be touching in conda.) I've tried adding a PathConfig.pth file. So far nothing works.
Remember, I don't want to add anything into the windows path (which obviously would solve my problem) because then it won't know which specific environment I want at the moment.