I'm running SageMath 8.9 on Windows 10. I'd like to run the following code:
gap.eval('LoadPackage("grape")')
gap.eval("n := 5")
gap.eval("grp := Group([ (1,2,3,4,5), (1,2,4,3) ])")
gap.eval("Der := []; for x in grp do if NrMovedPoints(x)=n then AddSet(Der,x); fi; od;")
gap.eval("Cay := CayleyGraph(grp, Der)")
This raises a RuntimeError. When I run:
from sage.features.gap import GapPackage
GapPackage("grape", spkg="gap_packages").is_present()
It indicates that 'grape' is not available. So I'd like to install it; however, with some searching online I encounter commands like:
sage -i gap_packages
But this does not work as 'sage' is not added to PATH (and I don't know how to do that).
Now I have GAP 4.10.2 installed independently of Sage, which does have 'grape' installed. If I can't install grape into sage, how can I direct Sage to look at another installation of GAP? I tried this (from here):
import sage.interfaces.gap
sage.interfaces.gap.gap_cmd = "/usr/local/bin/gap"
Where I changed "/usr/local/bin/gap" to "C:/gap-4.10.2/bin/gap.bat", which is how I normally launch GAP. It did not work.
Note: I've read the solutions here, but it doesn't work for me (as I mentioned above). That user seems to have been running OSX, where I'm running Windows 10. Also, the question is 7 years old, and perhaps the method is obsolete. Other methods online (such as found here) seem to have become obsolete. I can't find anything recent (regarding Sage version 8.9 on Windows).
Any help on this would be greatly appreciated!
If you can get a terminal prompt, you might be able to run ./sage -i gap_packages while in the sage root directory (this preempts the need to add sage to your PATH). I don't use Sage on Windows though, so I'm not sure if this will work.
Another approach is that you can copy folders from the package folder of a functional gap installation into the appropriate place in your sage installation. You should copy the grape folder from $GAP_ROOT/pkg to $SAGE_ROOT/local/lib/gap/pkg/.
Related
The official website makes it pretty clear that there is no support for kenlm in Windows. There is a Windows tag at the github repository but it seems to be maintained by few random contributors then and there.
How to set up kenlm for Windows then?
The new DeepSpeech PlayBook also includes instructions for setting up a Docker image and running training from within a Docker container. If you have Docker on Windows, this might be another solution.
The information for building a new Scorer is still in a PR, but may also be useful.
The solution is to use Ubuntu in Windows through Windows Subsystem for Linux
Get WSL for Windows
From your ubuntu bash navigate to the folder where you want to do the setup. You can access the Windows file system from the /mnt/c/ folder, which you can find at the root directory.
From there simply follow the official instructions, that is clone the git repo, and run cmake .. & make -j2 in order to build the project (after first making the necessary installations in your Ubuntu system).
Obviously, you must train the models or scorers using the Linux bash. You can also use these models from Windows using the kenlm python library.
E.g.
The two steps to build a scorer for the deepspeech-model as described here should be executed from your Ubuntu system. But after you have the scorer you should be able to run the command
deepspeech --model deepspeech-0.9.3-models.pbmm --scorer kenlm.scorer --audio audio.wav
from Windows. However, once you have WSL there's no need to do this work from Windows. Things will work nicely #your Ubuntu system.
I've faced the same problem and solved it by building kenlm wheel from Cygwin terminal as home page advices (pip wheel pypi-kenlm).
I've also uploaded wheel to pypi called kenlm-cygwin, but it's only python3.7.
I installed droneapi in the same manner given in the tutorial. However, it's missing all of the important modules that come with MAVProxy, such as console, wx, etc.
Was it supposed to install these modules, or should I move them over from MAVProxy itself instead?
Note: Windows 8 64-bit platform
I apologize that you had to investigate the issue without guidance. Publishing our Windows installer was not well prioritized, and it looks like that choice cost you several hours.
Here is what we will soon to address DroneKit Python installation on Windows:
A dedicated Windows installer generator lives at windows/droneapiWinBuild.bat. This generates a program Output\DroneKitsetup-1.x.x.exe which can be used to install all dependencies.
Yesterday we began testing the installer on Windows on every commit. https://github.com/dronekit/dronekit-python/pull/236
We will now publish the binaries generated by that test and document them in the Windows installation process. https://github.com/dronekit/dronekit-python/issues/164
Thanks for publishing your solution publicly. Hopefully we can address issues like these before they come up in the future.
Tim, DroneKit Engineer
So in a rare spark of intuition I discovered the answer. The modules required by Dronekit Python can be installed in the following ways:
Console- type "pip install console" into the WinPython cmd prompt
WX- http://wiki.wxpython.org/How%20to%20install%20wxPython
OpenCV- Download and install OpenCV version 2.4, then copy/paste the file cv2.pyd from OpenCV\build\python\2.7\x64\ to \python-2.7.6.amd64\Lib\site-packages.
At this point it should load all required modules, although it will throw a few exceptions which aren't important.
As always, 3DR documentation is incomplete. One would think that $800 million dollar profits would mean that they could hire more than 5 programmers for their new platform...
I wanted to install The Gimp on my mac. It's not in the HomeBrew tree, so I decided to install it with MacPorts, which I've never used before, and installed today just to build The Gimp. I used the command recommended at http://alemani.com/installing-the-gimp-with-macports/ namely
sudo port -v install gimp +quartz +animation +python27 -x11
After more than 5 hours, I got this:
---> Activating gimp #2.8.14_0+quartz
x ./
x ./+COMMENT
x ./+CONTENTS
x ./+DESC
x ./+PORTFILE
x ./+STATE
x ./opt/
x ./opt/local/
x ./opt/local/share/
x ./opt/local/share/gimp/
x ./opt/local/share/gimp/2.0/
x ./opt/local/share/gimp/2.0/themes/
x ./opt/local/share/gimp/2.0/themes/Nodoka/
x ./opt/local/share/gimp/2.0/themes/Nodoka/gtkrc
---> Cleaning gimp
---> Removing work directory for gimp
Error: Port + not found
and the job stopped. Now, The Gimp is installed, and it seems to be working, although I haven't done any real testing. But the verification that the website above indicates will happen never took place.
What does the error message mean? Is there a way I can use MacPorts to audit if the build was successful, and perhaps to repair it? Or, can I fix whatever was wrong and resume the build? (I'm not willing to wait another 5 and half hours to get to this point, though.) Or can I say to hell with it, and uninstall The Gimp and MacPorts? How do I do this? (I know there are pre-built binaries out there, and I would have grabbed one if I'd known the build was going to take so long.)
I really don't want to invest any time in learning MacPorts, since I'm happy with HoneBrew, so if someone can lead me by the hand, I'd be grateful.
The error message indicates you had a space between + and one of the variant names in the command line you invoked. That likely means gimp was not installed with the variants you chose – you can check which variants were used by running port installed gimp.
Anyway, if GIMP is running as you expect it to, you don't need to do anything at this point. You can force the check you were missing by running sudo port rev-upgrade (and it will also look a little different from the output mentioned on the website), but it's really just a sanity check that should not find any problems.
I am attempting to run foswiki on OpenBSD. Things are installed and i am able to open "/bin/Configure" page of foswiki configuration screen. but the page reports few errors, complaining that following files are either not found or outdated and new versions are required.
The Files are : grep, rcs, ci, co,rlog, rcsdiff
I tried commands like "pkg_add -Uu" to upgrade packages installed, but it reports all packages are uptodate.
I also tried "pkg_add rcs" "pkg_add grep" etc but non works.
So my basic question is how to I update above files to their latest version required by foswiki.
Regards
While I’m not familiar with Foswiki, my first thought is your web server is chrooted, as this is the default on OpenBSD, and, as a result, Foswiki cannot find the files it needs. You can copy the files Foswiki needs into the chroot or run the web server without chroot, which is bad from a security perspective.
all programs mentioned are part of a base openbsd install and the above answer is correct. the openbsd documentation on chrooted apache has more info.
if you don't have to stick with foswiki you can try dokuwiki instead which has package support on openbsd and installs easily in very much the same way you tried already:
sudo pkg_add -U dokuwiki
hope the process is pretty much self-descriptive. in addition, the manpage for pkg_add is a good thing to read. good luck!
I know there's a lot of information on here about installing python packages, but I'm quite new to python and I think I need a more "for dummies" level of help.
I was trying to install openpyxl for which as far as I can tell I need easy_install, for which, as far as I can tell, I need setuptools. I tried running the code provided here https://pypi.python.org/pypi/setuptools which is supposed to download and install setuptools (and according to some sites, easy_install aswell?) - it runs successfully, but help(modules) doesn't show setuptools or easy_install as modules, I have no idea whats installed and what isn't, or how I'm supposed to install any of it!
Essentially I'm very confused, very frustrated and really need someone to talk me through (in idiot-speak) what I'm supposed to do.
Thankyou!
We all start somewhere, I was there two weeks ago.
I'll assume you're using Python2. I believe Distribute and Pip are recommended for Python3 (which I will be using as examples). I will also assume you are on Windows.
First, python needs to be registered to Path. To check if this has been done automatically, open a command prompt (start -> programs -> accessories), and type 'python', then enter. If it returns the version number, etc, skip down a bit. If it throws an error, you need to add Python to Path.
Adding Python to Path
To add Python to Path on a Windows computer, go to:
Control Panel -> System -> Advanced Settings -> Environment Settings -> System Variables
Scroll down to select path, then click edit. Copy the entire line to a text document, and add your install directory for Python.exe (and the scripts folder) using ';' as a delimiter between different directories. Copy this back to Path and save. (Additionally close your command prompt window to reset it.)
For my Windows 7 machine, I added:
;C:\Python33;C:\Python33\scripts;
Take care when editing this file. There are many videos out there describing this in detail if you feel unsure about changing this.
Installing Modules (Such as setup_tools)
Once Python is registered in the Path file, download and unzip setup_tools to a folder within your Python install directory called 'modules'. I use ExtractNow to unzip, as it will unzip twice (as required) automatically.
Open a command prompt window again, and direct it to change directories by typing
cd [directory for module you want to install]
On my computer, this would be
cd C:\Python33\modules\distribute-0.6.40
Again, I use distribute, rather than setup_tools as it sounds like you need would for Python2. Simply use the appropriate directory. Press enter to change the directory.
Once you've entered this and it shows a changed directory, type:
python setup.py install
This indicates that you want to use the program python to use the setup.py file in the specified folder to install the module. This should be successful, and will write many lines of code.
If you want to install other modules, you would install them in a similar way. Python would automatically use setup_tools on your computer to finish each install.
Remember to import at the start of your script when using them to code:
import [module]
Happy Programming!