Install Octave Package Manually - installation

I want to install the package dataframe of Octave on one of my servers, which does not have internet access. I used my laptop to download dataframe-1.1.0.tar.gz. I wonder how I can install it on my server manually.

In the README.html of Octave 4.0.0 folder you can find the following passage:
Included Octave Forge Packages
A number of Octave-Forge packages have been included with Octave, however they must be installed in order to use them.
To install:
• Start Octave and then open the build_packages.m file found in the src folder where Octave was installed.
• Run the script build_packages.m to build and install the packages.
Installation is a one-time procedure. After installation packages must still be loaded in order to use them with the pkg load PACKAGENAME command.
Other packages are available from Octave-Forge.
What you need to do for other packages, which are not included with Octave, is: download the package from http://octave.sourceforge.net/packages.php. Then put the package in the src folder and modify build_packages.m respectively before executing it.

According to the Octave documentation:
37.1 Installing and Removing Packages
Assuming a package is available in the file image-1.0.0.tar.gz it can
be installed from the Octave prompt with the command
pkg install image-1.0.0.tar.gz
If the package is installed successfully nothing will be printed on
the prompt, but if an error occurred during installation it will be
reported. It is possible to install several packages at once by
writing several package files after the pkg install command. If a
different version of the package is already installed it will be
removed prior to installing the new package. This makes it easy to
upgrade and downgrade the version of a package, but makes it
impossible to have several versions of the same package installed at
once.

Related

Install things on Pepper

How would I install things on Pepper, since I don't know what package manager it uses. I usually use apt on my Ubuntu machine and want to install some packages on Pepper. I'm not sure what package manager Pepper has (if any) and want to install some packages, but also only know the name of the package using apt (not sure if the package name is the same on other package managers). And if possible, would I be able to install apt on Pepper. Thanks.
Note: From the research I've done, Pepper is using NaoQi which is based off Gentoo which uses portage.
You don't have root access on Pepper, which limits what you can install (and apt isn't on the robot anyway).
Some possibilities:
Include your content in Choregraphe projects - when you install a package, the whole directory structure is installed (more exactly, what's listed in the .pml); so you can put arbitrary files on your robot, and you can usually include whatever dependencies your code needs.
Install python packages with pip.
In NAOqi 2.5, a slightly older version of pip is installed that will not always work out of the box; I recommend upgrading it:
pip install --user --upgrade pip
... you can then use the upgraded pip to install other packages, using the upgraded pip, and always --user:
/home/nao/.local/bin/pip install --user whatever-package-you-need
Note however that if you do this and use your packages in your code running on Pepper, that code won't work on other robots until you do pip on them, which is why I usually only do this for tests; for production code I prefer packaging all dependencies in my app's package.
As a workaround if you need to install software (or just newer versions of software) using Gentoo Prefix is an option.
Gentoo Prefix builds a Gentoo OS on any location (no need of root, can be any folder). It includes it's own portage (package manager) to install new software.
I maintain a few projects to work with Pepper and use "any" software I want. Note that they are built for 64b (amd64) and 32b (x86) even though for Pepper only the 32b matter.
gentoo_prefix_ci and gentoo_prefix_ci_32b Which builds nightly the bootstrap of the Gentoo Prefix system. This is a process that takes a while to compile (3-6h depending on your machine) and that breaks from time to time (as upstream packages are updated and bugs are found, Gentoo is a rolling release distribution). Every night updated binary images ready to use can be found in the Releases section.
For ROS users that want to run it on the robot, based on the previous work, I maintain also ros_overlay_on_gentoo_prefix and ros_overlay_on_gentoo_prefix_32b. They provide nightly builds with binary releases of ROS Kinetic and ROS Melodic over Gentoo Prefix using ros-overlay. You can find ready-to-use 'ros_base' and 'desktop' releases.
For purposes related to the RoboCup#Home Social Standard Platform League where the Pepper robot is used I also maintain a specific build that contains a lot of additional software. This project is called pepper_os and it builds 270+ ROS packages, a lot of Python packages (250+ including Theano, dlib, Tensorflow, numpy...) and all the necessary dependencies for these to build (750+ packages). Note that the base image (it's built with Docker) is the actual Pepper 2.5.5.5 image, so it can be used for debugging as it if it was in the real robot (although without sensors and such).
Maybe this approach, or these projects, are useful.
The package manager on pepper is disabled. But you can copy the files to the robot and write your own service that imports any package you might need.
As a supplement on importing:
http://www.about-robots.com/how-to-import-python-files-in-your-pepper-apps.html
To get rid of error :
" SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
".
If you use python and requests package, just add verify=False at the end of your parameters.
r=requests.get(URL,params,header,verify=False)
Works with my Pepper
To get rid of
InsecurePlatformWarning: A true SSLContext object is not available.
install
/home/nao/.local/bin/pip install --user requests[security]
To get rid of:
CryptographyDeprecationWarning: Support for your Python version is deprecated.
install
/home/nao/.local/bin/pip install --user cryptography==2.2.2
If it based on Gentoo maybe we could try to install portage with pip.
pip install portage
Just a thought.

jython 2.7 package installation

Jython Package installation issue, using pip
Hi, I have installed Jython2.7 configured with pydev in eclipse neon, also configured python 3.6 package
I am able to install packages for python using pip installer?
pip install "packagename"
Below are some of the packages in python/Lib/Site-packages directory
I was able to install all the packages
How do I use pip installer to install packages for jython?
I tried to install Jip package with
jython install setup.py
The binary File got installed in the Jython/Lib/Site-packages folder
However, I am not able to use it.
where and how do I get Jython package binaries like jip?
Also, Please let me know how to search jython packages?
Also, How to make pip install library packages in jython?
Any other configuration like jython home, etc that should be made?
This answer is going to be really generic but I just recently have slogged my way through the setup for jython/jip/pip and here's roughly what I had to do.
Firstly, I'm running Windows 7 64 Bit from behind a proxy (work machine.)
Had to install jython 2.7.0 instead of 2.7.1 because (I think anyway) 2.7.1 requires admin privileges which I don't have on my work PC.
Pip didn't install correctly during the Jython installation and I spent an obscene amount of time trying to get it installed and functioning as I knew it from my cpython days. NOTE: Just because you get pip installed, doesn't mean you can use any package on a python package repo. As of 2.7.0, Jython doesn't have end to end capability to interpret/compile some libraries that rely on certain python wrappers of native OS function calls. I believe 2.7.1 makes solid progress in the direction of supporting all needed native calls but don't quote me on that. For example, I tried to use wxPython to make a simple GUI to test my jython install. Trying to install it from pip kept causing really non-specific error info that took me a lot of time to figure out that the cause was jython simply couldn't compile the wxPython source so beware.
I had to set environment variables 'http_proxy' and 'https_proxy' in the form of http://proxyhosturl:port and https://proxyhosturl:port respectively to get out from behind the proxies without having to invoke pip with the proxy switch every time I called it.
To actually install pip, have a look here. These instructions are for Python and Linux/Unix but the principle is roughly the same. Just use jython -m instead of python -m and ignore the '$' at the start of each command line.
Also be sure to CD to your python_home/bin folder when invoking the ez_install exe.
If that doesn't work (didn't for me), try using get-pip.py script with these instructions https://pip.pypa.io/en/stable/installing/ (remember jython instead of python etc.). Download it, cd to the download location and follow the noted install steps. Worth noting is about half way down the install instructions where it details installing from local archives (source/binary zip or tar.gz archives of pip and setuptools as better described here: https://packaging.python.org/tutorials/installing-packages/#installing-from-local-archives).
The links to the bin archives of pip and setuptools are here:
https://pypi.python.org/pypi/setuptools
https://pypi.python.org/pypi/pip
It may also be worth making sure that your PATH environment variable has the jython/bin path in the variable value. The jython installer should do this but, again, mine did not.
If all goes well, you should be able to invoke pip with the --version switch and if it prints a line with the installed pip version info then you should be good to go
Another quirky issue I had was I could invoke a function of pip one time and any subsequent times I would get a stack trace ending with something along the lines of an object not having a certain property. I fixed that by finding my temp directory by opening a windows explorer instance and typing %TEMP% in the address bar and hitting enter, it should take you to a subdir of your AppData folder and there you may see a folder with the name of the package you were trying to install and the text "_pip" somewhere in the directory name. Delete the directory and try the pip install command again. I had to do this + invoke pip install pip -U to update my install to the latest version. Then pip began behaving correctly in my instance.
pip search numpy (or your library name) will generate a list of results with the same logic it uses to locate your desired package when you call pip install but, again, just because it returns a matching package doesn't mean it will compile when you install it (numpy doesn't work because of the missing java to C native function calls I described earlier.) The trade off is that you can import code artifacts from Java JAR files in your Jython script files and leverage their functionality with relative ease. Between the public Java APIs available and the python packages that work with the jython interpretor, you can (in my experience) come up with a way to accomplish your task. See the following info on JIP, Maven and IDEs.
IDE and jython integration (Eclipse)
- If you are stuck using Eclipse (like me) it actually has pretty decent support for python development. Install the PyDev plugin for Eclipse from Help -> Install Software. Put in this URL https://marketplace.eclipse.org/content/pydev-python-ide-eclipse, hit tab, and select the PyDev plugin and hit 'finish.'
- Setup the jython interpretor info from Windows -> Preferences -> PyDev. Provide the path to your jython.jar file.
- You should now be able to use File -> New PyDev project to create a basic python project and configure it to use your version of Jython and Java.
Brief Overview of Jip and Maven
- jip is a jython package that is invoked very similarly to pip but instead will download JAR files from the Maven Central Repository instead of python packages from pypi.com, for example. See the install instructions described here. Note the install procedure for a global jip install which differ from just pip install jip. https://pypi.python.org/pypi/jip/
- I never got jip to work exactly as I wished because there's not a ton of documentation on it outside of what I already linked. However, if you install a JAR using jip, you have to go to your project in Eclipse and actually add the JARs themselves to your PYTHONPATH in order for import statements and editing to have intellisense and so that you don't get a classnotfound exception at runtime. See following screen shot.
- There is a JIP config file that you can use similar to the pip config ini file but I have yet to find any exhaustive documentation on it's setup.
Note in the above screen shot the first entry in the External libraries entries. By default, pip places installed packages in that directory so to enable eclipse to find them, you need to also ensure that location is entered.
In Conclusion
- I have more to add to this answer and I will do so as soon as possible. In the meantime, see this example project I've loaded into github.
https://github.com/jheidlage1222/jython_java_integration_example
It shows basic config and how to interface with JARs from python code. I used the apache httpcomponents library as an example. Good luck amigo.

Installing make with MobaXterm

Here is the command I'm running
apt-get install make
Here is the error output I'm getting
Found package make
Installing make
Unpacking make-4.2.1-1.tar.xz...
Extracting dependencies for usr/bin/make.exe...
Package make requires the following packages, installing cygwin libguile17 libintl8
Package cygwin is already installed, skipping
Found package libguile17
Installing libguile17
Downloading libguile17-1.8.8-1.tar.xz...
Downloading /home/mobaxterm/.aptcyg/http%3a%2f%2fmirrors.kernel.org%2fsourceware%2fcygwin/release/libguile17/libguile17-1.8.8-1.tar.xz using Windows internet settings
sha512sum: can't open 'libguile17-1.8.8-1.tar.xz': No such file or directory
/bin/apt-cyg: line 476: test: 94f5e268a2f32d7c6b19747792a18d13f468779daca46bdd20aa99d63931c4fe8071a460e62db9d1779b15fee167ce7c6c65a0e90e61225cf8be12e3a14a2252: unary operator expected
md5sum: can't open 'libguile17-1.8.8-1.tar.xz': No such file or directory
/bin/apt-cyg: line 479: test: 94f5e268a2f32d7c6b19747792a18d13f468779daca46bdd20aa99d63931c4fe8071a460e62db9d1779b15fee167ce7c6c65a0e90e61225cf8be12e3a14a2252: unary operator expected
Checksum did not match, exiting
Found package libintl8
Package libintl8 is already included, skipping
Package make installed.
Is there anyone who has GNU make running on MobaXTerm and who would like to help?
Run this command, it worked for me at least.
apt-get --legacy install libguile17
I normally collect the Development plugins from http://mobaxterm.mobatek.net/plugins/Development.mxt3
Once the .mxt3 files are getting downloaded, moved them to the installed folder where the MobaXterm_.exe is there, this location could be in Program Files if you are using installer edition or the extracted folder incase of zip.
Please restart the MobaXtern once.
After restarting MobaXterm, this will work like a champ.
Hope if this solves your issue.

Avoid repetitvely downloading packages when upgrading several environments?

I have several different environments in anaconda. When I try to upgrade all those environments via conda update --all after use "source .../activate [env ]" it downloadeds all packages for each environment separately.
However, most packages are exactly the same... is there any way I can avoid downloading the same packages for each environment?
When updating or installing a package with conda it will check if that exact package already exists in the ~/anaconda/pkgs directory. If the exact package is present conda will link this package rather than downloading it again. You should see the list of packages being downloaded in the output:
The following packages will be downloaded:
package | build
---------------------------|-----------------
and what is being installed to the environment:
The following packages will be UPDATED:
Packages listed under the "UPDATED" section and not under the "downloaded" section are being linked from the ~/anaconda/pkgs/ directory.

cabal + proxy: downloading packages from hackage

I'm using Haskell Platform 7.10.2-a (64-bit) on Windows:
>cabal -V
cabal-install version 1.22.6.0
using version 1.22.4.0 of the Cabal library
My proxy requires (basic HTTP) authentication:
>set http_proxy=http://user:passwd#acme.com:port
It seems to work for cabal update:
> cabal update
Downloading the latest package list from hackage.haskell.org
Skipping download: Local and remote files match.
However, when I try to install any package, it fails:
> cabal get ghc-mod
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
cabal: There is no package named 'ghc-mod'.
>cabal install shelltestrunner
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
cabal: There is no package named 'shelltestrunner'.
You may need to run 'cabal update' to get the latest list of available
packages.
How can I get get or install to actually use the proxy? Or is there some other problem preventing installation of packages from hackage?
I may have found the cause, when using cabal -v update, it displays path like
\\ACME.NET\UserData\username\RF\AppData\Roaming\cabal\packages\hackage.haskell.org\00-index.tar.gz
while other uses of cabal use path like C:\Users\username\AppData\.., but without the RF folder in the displayed path. Must be my company network server config. Anyway, I updated paths like remote-repo-cache to use another folder in cabal/config and it works better now.

Resources