Run GrassGIS API external on Python Shell Error module run None - python-2.7

I am trying to run the GrassGIS modules on external python scripts on a ms windows server 2016 standard. What ever I do (experimenting with different installations of Grass, changing environmental variables, changing python code) - it won't run.
I have tried to run installation with OSGEO4W and standalone version. in 7.2 , 7.4 and 7.6 (7.6 unintentionally as it installed 7.6 despite reading 7.4
(svn checkout https://svn.osgeo.org/grass/grass/branches/releasebranch_7_4 grass74_release >>on https://trac.osgeo.org/grass/wiki/DownloadSource).
I have also experimented with all different recommendations for environmental variables I found online - however, I cannot get it to run.
enter image description here
Any Help - So much appreciated!!!!

Related

Weka will not open on MacOS

I have installed the latest version of Weka(3.9.3). I have also ensured that both Java and MacOS are up to date on my machine.
When I double-click the Weka icon to open it, it bounces for a few seconds and never opens.
I have downloaded Weka 3.8.3 to see if that makes any difference, but the same thing happened.
Any ideas on why this is happening?
I was facing a similar issue but it worked for me when I start weka on the command line.
Change directory into the weka-3-8-0 directory
cd /Applications/weka-3-8-0
invoke the jvm with the weka.jar file located in the above directory
java -jar weka.jar
We have identified the issue with the WEKA 3.8.3 and WEKA 3.9.3 applications for the Mac that, for many users, caused them to fail to start up via double-clicking.
On December 13, we replaced weka-3-8-3-oracle-jvm.dmg and weka-3-9-3-oracle-jvm.dmg on SourceForge with a new .dmg compatible with older versions of OS X, based on the HFS+ file system. Unfortunately, this new “release" included a pre-17 December 2018 version of the Amazon Corretto JVM 1.8.0_192 instead of the Oracle Java VM we had used before. Unfortunately, that particular version of Amazon’s Corretto had a bug on Macs:
"The libfontmanager in Corretto is linked to the libfreetype in X11 and breaks when X11 is not installed."
See https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/change-log.html.
We never noticed this problem and could not reproduce it because if, like us, you had XQuartz installed, or the libfreetype.dylib library was installed on your Mac via Homebrew, the WEKA application still worked in spite of this bug.
We have reproduced the problematic behaviour by removing XQuartz and Homebrew on one of our Macs. And, indeed, the WEKA macOS application no longer started when the bird was double-clicked.
We have just made new “releases” of the WEKA 3.8.3 .dmg and the WEKA 3.9.3 for the Mac that use the latest version of Corretto 8 (8.212.04.2). You can find these .dmg files at
https://sourceforge.net/projects/weka/files/weka-3-8/3.8.3/
and
https://sourceforge.net/projects/weka/files/weka-3-9/3.9.3/
respectively.
They are called
weka-3-8-3-corretto-jvm.dmg
and
weka-3-9-3-corretto-jvm.dmg
respectively.
We have also replaced the links for the Mac applications on the main WEKA downloads page at
https://www.cs.waikato.ac.nz/ml/weka/downloading.html

How to upgrade a standalone Jetty installation on Windows?

This is somewhat embarrassing, but I'm totally lost when it comes to upgrading from Jetty 9.2 to 9.4. 9.2 was installed two years ago using jetty-9.2.0-setup-package.zip. The file contained commons-deamon and more so that the install could be done using command
create-jetty-dist.bat d:\jetty9 Jetty9 80 50001 D:\etc\gateway NO
Now I've downloaded the latest version from https://www.eclipse.org/jetty/download.html]1 - jetty-distribution-9.4.14.v20181114.zip - but, I cannot figure out how to upgrade the installation. Mostly I find docs about Maven and update the POM, but the installation is standalone and no Maven. There is a Chapter 36. Upgrading Jetty about upgrading - but still does not help much
All my Google-skills does not help either.
I have not found the guts yet to simply replace the folder
D:\jetty9\jetty
Maybe I do overthink and the solution is that simple. But still it keeps bugging me that I cannot seem to find an install file for 9.4 like I did for 9.2
I did overthink - is was almost only to replace the 9.2 distribution folder with the 9.4. But for the service to be reconfigured and also to ensure that all changes from 9.2 to 9.4 was implemented me and my colleague had to do:
Edit the .bat file that came with the jetty-9.2.0-setup-package to support 9.4
Off course change the reference for all 9.2 to 9.4 distribution in the script
9.2 used "logging", 9.4 uses "console-capture"
9.2 used "jetty.port", 9.4 uses "jetty.http.port"
Copy the 9.4 distribution file to the folder where the .bat-file is to be found in the setup-package
Then we sc delete jetty9 the service and ran the script.
In short, that was what we needed to do.

How to find the correct version of PyBindGen for Python Bindings

Currently, I am working on the Ns3 simulator and now trying to enable the pyviz visualizer. According to the doc, I have downloaded the three dependencies which are
py27-pygtk
py27-pygoocanvas
py27-pygraphviz
Now in order to use this, I still need to enable the python bindings which I used /usr/bin/python2.7 ./waf configure wanna to check what needs for enabling python bindings. The result shows that
Python Bindings : not enabled (PyBindGen version not correct and newer version could not be retrieved)
So I checked the Doc and downloaded PyBindGen (version 0.18.0). The output shows
Installed /Library/Python/2.7/site-packages/PyBindGen-0.18.0-py2.7.egg
Processing dependencies for PyBindGen==0.18.0
Finished processing dependencies for PyBindGen==0.18.0
After I ran the configuration check the results still showed that PyBindGen version not correct and newer version could not be retrieved
So I presume that is that because I installed the wrong version of PyBindGen? If so how can I get the suitable version for enabling Python Binding?
I would appreciate if there is someone who can help me figure it out. Many thanks.
S.
According to the Google Group
Here is the resolution(tested it worked):
follow the instruction
hg clone http://code.nsnam.org/ns-3-allinone
cd ns-3-allinone && ./download.py
This will solve the Python Binding problem
Updated: after downloading this version of ns3. Solving the python binding problem. Then there will be another problem after running
./waf configure
it will show the result like this:
PyViz visualizer: not enabled (Missing python modules: gtk, goocanvas, pygraphviz)
Even though I have installed all of the three dependencies. So after some researches I found that there has another questions post So there is a guy gave the guessing that
" Waf found the standard Python here (/usr/bin/python is the Apple path), and you installed the python libraries using MacPorts.
Most probably you'll need to configure Python to point to the MacPort-based Python, or it will not see what you installed."
So according to How to: Macports select python
here is the solution:
port select --list python
sudo port select --set python python27
Hope it will help anyone come afterwards to use this.
S.

build syntaxnet with bazel: pywrap error

I am trying to build syntaxnet using bazel without root rights. I have downloaded bazel 0.2.2b and pulled the syntaxnet git repository as suggested on its website. I have managed to pass the new gcc for the bazel build and set my environment variables to include the local gcc as well as my local python version (2.7). I also added swig and jdk to PATH. Still, I get the following error when trying to run bazel test syntaxnet/... util/utf8/...:
INFO: Found 65 targets and 12 test targets...
ERROR: /home/davba/.cache/bazel/_bazel_debauscd/33ff1ccf943e8d1167bc44c81c9ea8f4/external/org_tensorflow/tensorflow/python/BUILD:1023:1: output 'external/org_tensorflow/tensorflow/python/pywrap_tensorflow.cc' was not created.
ERROR: /home/davba/.cache/bazel/_bazel_debauscd/33ff1ccf943e8d1167bc44c81c9ea8f4/external/org_tensorflow/tensorflow/python/BUILD:1023:1: output 'external/org_tensorflow/tensorflow/python/pywrap_tensorflow.py' was not created.
ERROR: /home/davba/.cache/bazel/_bazel_debauscd/33ff1ccf943e8d1167bc44c81c9ea8f4/external/org_tensorflow/tensorflow/python/BUILD:1023:1: not all outputs were created.
After that, none of the tests are run which means all twelve tests are skipped. Any ideas are highly appreciated.
Edit: I have realized that I used an old version of protobuf. Unfortunately, the problem remains even after updating.
Since it seems to be a python related problem and I had built python from source, I tried to use anaconda but ended up with the same error.
Some more information: I am using CentOS 6.5 and tried python 2.7.11.
I set the environment variables as follows and changed the CROSSTOOL file for building bazel accordingly:
CXX=/soft/csw/linux64/rel6/gccs-4.8.5/bin/c++
CC=/soft/csw/linux64/rel6/gccs-4.8.5/bin/gcc
LDFLAGS="-L/soft/csw/linux64/rel6/gccs-4.8.5/lib -L/soft/csw/linux64/rel6/gccs-4.8.5/lib64":"-L/home/davba/syntaxnet-utils/pcre/lib"
CXXFLAGS="-L/soft/csw/linux64/rel6/gccs-4.8.5/lib -L/soft/csw/linux64/rel6/gccs-4.8.5/lib64"
LD_LIBRARY_PATH=/soft/csw/linux64/rel6/gccs-4.8.5/lib:/soft/csw/linux64/rel6/gccs-4.8.5/lib64:/home/davba/AnacondaPython/lib:$LD_LIBRARY_PATH
SWIG_PATH=/home/davba/syntaxnet-utils/compiled-swig/bin
Thanks!
I tried running it on a different machine with CentOS 7.0, but wound up with the same error.
Finally, I had the opportunity to switch to an Ubuntu machine with sudo rights which enabled me to run the bazel installer and compile syntaxnet without a problem. This solves the problem in my case. For a "real" fix I think we have to wait for someone experiencing the same issue.

Python 32 or 64 on 64 bit Windows 7? How will this effect installing easy_install?

I wrote some python code on my mac and how I have to transfer it over to a windows computer. This is frustrating beyond words. I installed Python 2.7 x32, then I uninstalled it, then I installed Python 2.7 x64. My python script depends on xlrd and xlwt, and some other downloaded modules. I would like to install those using easy_install or pip or any way that is easy for somebody who doesn't know too much about the really intricate workings of a computer. As of now, if I do this:
C:\Windows\System32> python
I get:
'python' is not recognized as an internal or external command operable program or batch file.
Would someone suggest a next move for me?
I did a bunch of google-ing and stackoverflow-ing and seem to have landed here, I'm not sure how to download something from here. For example, how would I download Pip, and also, which one would I download?
People say that a person should download and install this, how would I do that?
I'm familiar with terminal, what would I type into cmd?
The reason that I things were not going well for me was because I was using a mixture of Python 2.7 (32-bit) and Python 2.7 (64-bit). After more researching I found that even though my Windows 7 was 64 bit, I didn't have to download the 64-bit python. In fact, the 32-bit python was more compatible with other programs. So I clicked around and uninstalled python and everything else that had the name 'Python' in it from my Add/Remove programs menu. This took about 10 minutes. Next, I downloaded the 32-bit Python 2.7. After this, all of the packages that I download, I made sure that they were 32-bit and not 64-bit.
Also, very important, I went to my 'Environment Variables' (google how to get there) and added the directory of where Python27 was installed. To do this you can follow this guide. The last thing that I did was add ;.PY to the end of PATHEXT.