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/
Related
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.
I'm a beginner, I have really hit a brick wall, and would greatly appreciate any advice someone more advanced can offer.
I have been having a number of extremely frustrating issues the past few days, which I have been round and round google trying to solve, tried all sorts of things to no avail.
Problem 1)
I can't import pygame in Idle with the error:
ModuleNotFoundError: No module named 'pygame' - even though it is definitely installed, as in terminal, if I ask pip3 to install pygame it says:
Requirement already satisfied: pygame in /usr/local/lib/python3.7/site-packages (1.9.4)
I think there may be a problem with several conflicting versions of python on my computer, as when i type sys.path in Idle (which by the way displays Python 3.7.2 ) the following are listed:
'/Users/myname/Documents', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python37.zip', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload', '/Users/myname/Library/Python/3.7/lib/python/site-packages', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages'
So am I right in thinking pygame is in the python3.7/sitepackages version, and this is why idle won't import it? I don't know I'm just trying to make sense of this. I have absoloutely no clue how to solve this,"re-set the path" or whatever. I don't even know how to find all of these versions of python as only one appears in my applications folder, the rest are elsewhere?
Problem 2)
Apparently there should be a python 2.7 system version installed on every mac system which is vital to the running of python regardless of the developing environment you use. Yet all of my versions of python seem to be in the library/downloaded versions. Does this mean my system version of python is gone? I have put the computer in recovery mode today and done a reinstall of the macOS mojave system today, so shouldn't any possible lost version of python 2.7 be back on the system now?
Problem 3)
When I go to terminal, frequently every command I type is 'not found'.
I have sometimes found a temporary solution is typing:
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
but the problems always return!
As I say I also did a system reinstall today but that has helped none!
Can anybody please help me with these queries? I am really at the end of my tether and quite lost, forgive my programming ignorance please. Many thanks.
Try it with the problem1
I'm not an expert neither, but I think you need to install both in terminal and python in order to use the program.
python -m pip install pygame
You should actually add the export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" to your .bash_profile (if you are using bash). Do this by opening your terminal, verifying that it says "bash" at the top. If it doesn't, you may have a .zprofile instead. Type ls -al and it will list all the invisible files. If you have .bash_profile listed, use that one. If you have .zprofile, use that.
Type nano .bash_profile to open and edit the profile and add the command to the end of it. This will permanently add the path to your profile after you restart the terminal.
Use ^X to exit nano and type Y to save your changes. Then you can check that it works when you try to run the program from IDLE.
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 trying to install the activity-browser for brightway2 on Mac OS X. In the terminal and in my b2-python directoy, I write:
bin/pip install https://bitbucket.org/cmutel/activity-browser/get/2.0.zip
The installation starts nicely with downloading and checking the required packages. For progessbar-ipython however, I get an error an the installation stops:
File "/private/var/folders/7h/4zl3jkyd4dzgc464d3ljvv7h0000gn/T/pip-build-m1_3y3zc/progressbar-ipython/progressbar/__init__.py", line 49, in <module>
from compat import *
ImportError: No module named 'compat'
I have learned that the error comes from support for python 2.4 only, as described here: https://github.com/niltonvolpato/python-progressbar/issues/28 , and here: https://bbs.archlinux.org/viewtopic.php?id=209444
Unfortunately, I don't get it installed. Admitted, I am not very familiar with manually installing packages. Attempts with replacing the cached version with a corrected one as described in the links have failed so far.
Do you have any ideas and suggestions? Thanks a lot!
Best wishes, Niklas
It looks like you haven't activated the right environment. I assume you have followed the installation instructions. If so, you need to make sure to activate with brightway2 environment with something like source ~/bw2-python/bin/activate bw2.
progessbar-ipython hasn't been a dependency for a long time. I guess the development versions of bw2-* should be official releases instead of devX, as this is just causing problems.
when trying to install cygwin, I keep getting this error message:
the entry point
rl_filename_rewrite_hook could not be
located in the dynamic link library
cygreadline7.dll
Has anyone seen this before ?
Thanks
I had the same error with cygwin1.dll. I checked in c:\cygwin\bin and noticed there were two files, cygwin1.dll and cygwin1.dll.new (possibly from a failed or aborted setup run?). The ".new" version was in fact newer (and slightly larger) than the existing cygwin1.dll, so I replaced cygwin1.dll with cygwin1.dll.new, and ran setup again. It completed with no errors.
First idea is to try reinstalling libreadline7 (or similarly named package) using the cygwin installer. Use the search field to enter readline to make it easier to find the right package.
Another option is that in the cygwin installer, change form Curr to Prev in order to switch to the previous-stable release. This means lots and lots of downloading and reinstalling. I anctually did manage to provoke my error into becoming a libreadline7 error, and switching to Prev at least got rid of the error messages. (Yay! Now bash, ssh server and git is working again! Back to work here then...)
Please check your path in WINDOWS (advanced system properties) environment. I found that C:\WinAVR\bin was coming before my cygwin path, so I moved that to the end, fixed my issue.
If you have multiple CYGWIN1.DLL files in your system, it definitely causes headaches if you're not careful.