pulp.pulpTestAll() :has no attribute 'pulpTestAll' - import

I just installed pulp and followed instructions here: https://www.coin-or.org/PuLP/main/installing_pulp_at_home.html#testing-your-pulp-installation
however it shows the following message:
AttributeError: module 'pulp' has no attribute 'pulpTestAll'
besides that, the glpk can't be installed either:
(base) MBP:pulp-1.4.0 ci$ sudo apt-get install glpk
sudo: apt-get: command not found
can anyone help? thanks

I ran into a similar issue today. It seems the test functionality has been removed in PuLP 2.0.
This is described here:
https://github.com/coin-or/pulp/issues/253
Can't help you with the GLPK install I'm afraid, been a while since I worked in Linux, but that seems unrelated to PuLP, as that is only the LP-interface.
It has been the case for a while that for PuLP to detect your solvers on linux you needed to run the test, so maybe you can try following the tip in the github discussion, regarding downloading the help functionality from the github code. Then you can run the test and PuLP can detect the solvers on your system after you've installed them.

For installing glpk, go to the link below
https://appuals.com/how-to-fix-sudo-apt-get-command-not-found-on-macos/
Follow the section titled as "Method 1: Installing Homebrew in macOS" in the middle of the page.
Once done, run the command below
brew install glpk
It worked for me. Hope it works for you too.

Related

How I can open pgadmin4 in fedora 36?

Good evening people, I am trying to install pgadmin4 on fedora 36, I followed all the steps in the documentation and pgadmin4 and its dependencies were installed correctly but I do not know how to start it, or open it and it does not let me configure it on the web because I do not create the directory described in the final step to configure the web version.
I had the same problem. I solved it installing pgadmin4 from linux-pachages
https://linux-packages.com/fedora-36/package/pgadmin4-qtx86-64
I followed the same instructions but mistakenly changing "yum" to "dnf" out of force of habit. I found I got an install out of it which seemed OK at a glance, but it was just documentation and not an executable, and there was no shortcut added to run pgAdmin. Perhaps you might have inadvertently done something similar? After uninstalling, I tried again using "yum" exactly as documented and the latest executable installed without any issue. So the steps to install that would work for me were as follows. (Desktop version in my case.)
sudo rpm -e pgadmin4-fedora-repo
sudo rpm -i https://ftp.postgresql.org/pub/pgadmin/pgadmin4/yum/pgadmin4-fedora-repo-2-1.noarch.rpm
sudo yum install pgadmin4-desktop
The QT workaround also mentioned as an answer worked for me, but I wanted to avoid that since it is an earlier release (6.9) than the current 6.11, isn't officially supported and fires a warning about that every time on start up saying some functionality may be missing, which is not good for clients to see potentially in my case.
Same problem - couldn't open it after installing. You have to install pgadmin4-desktop not pgadmin4.

Cannot install QuickCheck for Haskell: "runInteractiveProcess: permission denied"

When I run the commands
cabal update
cabal install QuickCheck
on windows powershell, or
cabal install --lib --package-env . QuickCheck
I get runInteractiveProcess: permission denied. I have found that I need to run "/scripts/securetmp" and un-secure my /tmp. How do I do that? What does it mean to run /scripts/securetmp?
I was asked for the link to the advice, here are 2 links from 2 different people who said the same:
1.In one of the answers on a similar question on StackOverflow:
Can't install and use Cabal (Haskell) on CentOS Server - zlib-0.5.4.1 failed during the building phase
2.On a website, though it's in Russian, but says the same thing:
https://coderoad.ru/24461456/%D0%9D%D0%B5-%D1%83%D0%B4%D0%B0%D0%B5%D1%82%D1%81%D1%8F-%D1%83%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%B8%D1%82%D1%8C-%D0%B8-%D0%B8%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D1%82%D1%8C-Cabal-Haskell-%D0%BD%D0%B0-%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%D0%B5-CentOS-%D0%BE%D1%88%D0%B8%D0%B1%D0%BA%D0%B0
On both those links there are other answers, that talk about running some bootstrap.sh script. That might be another solution, but I don't understand how to do it.
Try to install it using :cabal --http-transport=plain-http install QuickCheck, with this you will be forcing cabal not to use powershell's webclient, it worked for me.

Cannot use Swift on Ubuntu 18.04

After conscientiously following the install instructions on Linux from swift.org, I encounter an issue where it is not possible to compile anything on a Ubuntu 18.04 machine. The REPL seems to work but during compilation (when calling swift build) the following error appears:
/usr/bin/ld: cannot find -lstdc++
There are more details in the full bug report [SR-9093]. I don't know at all what to do to solve this issue, there are similar problems already mentioned in other bug reports, for instance on this really old one [SR-35].
What should I do?
Thank you
I am assuming that you had already installed the libstdc++ successfully and you have set the permissions properly. But I really doubt that it was installed correctly but it was installed with corruption of some sort. The corruption occurred because you didn't install libstdc++ via a package manager. Result was some form of weirdness in the package manager database which effected the overall functioning system. Exactly why adding something to a folder should change anything at all. I don't know why this happens, unless the folder is hot i.e symbolically linked to a program which doesn't have any tolerance for hacks like simply copying a file into the folder. So for now try to install the libstdc++ again. Below is the link to the file to again download the correct program and this is compatible with amd64.
http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libstdc++6_5.4.0-6ubuntu1~16.04.10_amd64.deb
And below are some link to help
https://ubuntuforums.org/showthread.php?t=1425470
https://ubuntuforums.org/showthread.php?t=808045
https://ubuntuforums.org/showthread.php?t=808045
https://packages.ubuntu.com/search?keywords=libstdc%2B%2B
https://packages.ubuntu.com/xenial/amd64/libstdc++6
Install libstdc++
sudo apt install libstdc++6
It seems possible that the apt install did not run the ldconfig program, which should be run to add the library to the list of those which ld.so knows about.
It looks like you can do it manually:
sudo ldconfig
IMPORTANT CAVEAT: I don't have Ubuntu and haven't been able to test this. And it's a sudo command. Run at your own risk, YMMV, etc.
If this does not work, it's possible that a file called /etc/ld.so.conf is not set up to search the directory where libstdc++ ended up. I wouldn't dare try to describe how to fix that.
sudo apt install -f
The command above should install any missing dependencies.

How do I install the hg-git plugin on Debian Stretch?

Debian Jessie, as well as sid, have a mercurial-git package which contains the hg-git plugin. However, this package was (auto-)removed from Debian Stretch to to a release-critical bug.
But - I need it installed and running. Surely this should be possible, right?
Well, I followed the installation instructions on the plugin page:
I ran apt-get install python-setuptools python-setuptools-git python4-setuptools python3-setuptools-git
I ran easy_install hg-git and it seemed to work
But still, when I run various mercurial operations I get, as the first line, the error message:
*** failed to import extension hgext.git: No module named git
(regardless of whether I'm doing anything git-related or not.)
My questions:
Why is this happening?
What do I need to do in order to make the error message go away while having hggit working?
Now,
How do I correctly install dulwich to get hg-git working on Windows?
Apparently, that critical bug doesn't manifest always (and perhaps only under very specific circumstances), so you can try installing the Debian sid version of the mercurial-git package (that is, version 0.8.11-1 at the time of writing). There's a SuperUser question about how to do this:
https://linuxaria.com/howto/how-to-install-a-single-package-from-debian-sid-or-debian-testing
my personal opinion in this case is to simply install the .deb file, which you can get from here (it's not platform-specific; at the link you'll need to choose a mirror.) That makes the error message go away, at least assuming you have:
[extensions]
hgext.bookmarks =
hggit =
in your ~/.hgrc file.

Installing MATLAB Runtime on CentOS 7

I am trying to install the MATLAB Runtime (see www.mathworks.com/products/compiler/mcr) on Cent0S 7. I think I have installed MCR correctly because the install finishes through saying it completed after running
sudo ./install -mode silent -agreeToLicense yes
However, I am currently getting a error of:
Fatal error loading library /usr/local/MATLAB/MATLAB_Compiler_Runtime/v80/bin/glnxa64/libmwmclmcr.so Error: libXmu.so.6: cannot open shared object file
I have searched around on the forums and found a couple of post that indicate this may be an issue with either 32-bit vs. 64-bit libraries and/or X Windows. Also, I am pretty sure I am setting the following environment LD_LIBRARY_PATH and XAPPLRESDIR set variables correctly.
Has anyone out there successfully installed MATLAB Runtime on CentOS 7? Any help would be appreciated.
Thanks,
Derek
In case anyone else has this issue the following library install fixed the issue for me:
sudo yum install libXmu.x86_64