Using opscode's omnibus installer in windows 7 - python

I am working my way through a video tutorial at http://gettingstartedwithdjango.com/en/lessons/introduction-and-launch/
I am working on win7 and using git-bash for my terminal. I have installed the latest virtualbox - 4.2.12 and the latest vagrant - 1.22.
I tried to run vagrant up and got: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
creating Makefile
make
sh: 1: make: not found
Once of the answers given by jtimberman is:
The basebox you're using does not have the "build-essential" package installed by default, and it has a "[shell provisioner][1]" that installs the Chef gem into the default Ruby environment. Chef has a dependency on the JSON RubyGem, which itself has C extensions that must be compiled. This is what is looking for `make`.
To resolve this issue, I'd recommend using Opscode's "omnibus" [full stack installer for Chef][2]. This can be used by changing the shell provisioner line to:
config.vm.provision :shell, :inline => "curl -L https://opscode.com/chef/install.sh | bash"
The `[install.sh][3]` script simply inspects the VM to determine what its platform is so it can retrieve the proper URL from an S3 bucket. If you prefer you can use the constructed URL to download the .deb file directly:
https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/11.04/x86_64/chef_11.4.4-2.ubuntu.11.04_amd64.deb
And then install it:
dpkg -i chef_11.4.4-2.ubuntu.11.04_amd64.deb
I have not been able to get the first method to work and would like to try the second. would:
dpkg -i chef_11.4.4-2.ubuntu.11.04_amd64.deb
work on win7. If not how do I get this working in windows?

In order to compile native extensions in Windows, you must install the Ruby DevKit. Joshua's answer is valid for Debian-based systems.

An addition to sethvargo.
In addition to the Ruby DevKit, you also need the client library for your native software.
For example, in order to compile/install ruby-oci8 gem, you should have the Oracle Client installed on your computer as well.

Related

How do I install python on a windows machine using a cygwin terminal?

I am trying to install python through cygwin on a windows machine in order to make use of a statistical program that can only be implemented using python in a linux environment.
I have run setup-x86_64.exe and installed all python related cygwin packages in an attempt to install python, but when I open a terminal and type python I just get
$ python
-bash: python: command not found
which is the same for all python commands I try so clearly the installation has not occurred. However, I have found a path to Python-2.7.9 which appears to contain the files required to build python from source.
When I run ./configure it is successful, but when I then input make it fails due to:
File "build/temp.cygwin-1.7.35-x86_64-2.7/libffi/fficonfig.py", line 33, in <module>
ffi_sources += ffi_platforms['X86_WIN64']
KeyError: 'X86_WIN64'
Makefile:488: recipe for target 'sharedmods' failed
make: *** [sharedmods] Error 1
Anyone know why make won't work?
The options in ./configure --help are unfamiliar to me, could any of these options allow for successful installation?
Any ideas would be greatly appreciated, thank you.
Cygwin comes with an installer, called setup.exe or setup-x86_64.exe. Just run it and type python to the search box. Then let it install it for you.
python language interpreter is the basic package you need.
So, this question is 3 years old, but this error still happens with most recent versions of Python 2 (tested with 2.7.13 and 2.7.15)
I was able to get python to build by modifying the following file in the build directory.
--- build/temp.cygwin-2.11.1-x86_64-2.7/libffi/fficonfig.py~ 2018-11-03 14:51:53.290000000 -0400
+++ build/temp.cygwin-2.11.1-x86_64-2.7/libffi/fficonfig.py 2018-11-03 14:53:41.793000000 -0400
## -9,6 +9,7 ##
'X86': ['src/x86/ffi.c', 'src/x86/sysv.S', 'src/x86/win32.S'],
'X86_FREEBSD': ['src/x86/ffi.c', 'src/x86/freebsd.S'],
'X86_WIN32': ['src/x86/ffi.c', 'src/x86/win32.S'],
+ 'X86_WIN64': ['src/x86/ffi.c', 'src/x86/win64.S'],
'SPARC': ['src/sparc/ffi.c', 'src/sparc/v8.S', 'src/sparc/v9.S'],
'ALPHA': ['src/alpha/ffi.c', 'src/alpha/osf.S'],
'IA64': ['src/ia64/ffi.c', 'src/ia64/unix.S'],
The source files, in particular src/x86/win64.S, are present in the source tree. For some reason, ./configure does not seem to be properly adding the option to the dictionary in the fficonfig.py file, which causes the KeyError posted in the question. After making this modification, make and make install completed successfully and I was able to install an alternate version of python in addition to the normal Cygwin package.
I'm not yet sure why this happens, but I thought I would attempt to provide a solution to the question actually asked rather than just telling the asker to install a pre-compiled version using the package manager.
Since building Python from source was said to be a bad idea, I assumed my Cygwin was broken. I attempted to uninstall Cygwin following the instructions on the Cygwin website, but I was unable to remove it due to permission difficulties (I use a university-supplied Windows machine). My last resort was to run the Cygwin installation wizard setup-x86_64.exe and uninstall all packages, then run the wizard once more and select the necessary packages again as if starting from new. Miraculously, installing the required packages from scratch solved the problem and I am now running Python through my Cygwin terminal with no errors.
If you want to run Python on Cygwin, you might need to build it from source.
download the source
unpack it to the directory you could delete later, eg: build
run Cygwin, type: cd /path/to/build
run ./configure --help and read the help about the options you'll need
./configure #options
make

Trouble installing scikit-bio on Windows

When attempting to install the scikit-bio toolkit via pip on Windows XP using Python 2.78 and Visual C++ 2008 Express Edition, the process is interrupted with the following message issued by VC:
cl : Command line error D8021 : invalid numeric argument '/Wno-error=declaration
-after-statement'
Concerning this error, Microsoft Developer Network website just says:
invalid numeric argument 'number'
A number greater than 65,534 was specified as a numeric argument.
I did not (yet) attempted to install scikit-bio under Linux (Ubuntu 12.04 Precise), but I am under the impression that it will work fine (as everything goes as regards Linux).
Has anyone ever succeeded installing scikit-bio under Windows (XP, 7, 8)? Any hints?
Thanks in advance!
I've installed Anaconda's Python (3.5) on a Windows 10 machine. As you should know, there is no official version of scikit-bio for this platform, but you can install it with this workaround:
Download the latest source from the Scikit-bio Github repository.
Using a tool like 7-zip, unzip it at your home directory.
Open a command line client and change to the source's directory
cd %HOMEPATH%\scikit-bio-master
Using Notepad++ edit the file setup.py
"C:\Program Files (x86)\Notepad++\notepad++" setup.py
Look for the line where the ssw_extra_compile_args variable is defined and change it. You can comment the previous version and redefine the variable in a new line:
#ssw_extra_compile_args = ['-Wno-error=declaration-after-statement']
ssw_extra_compile_args = []
Save the changes, close the editor and run the installation with this command:
python setup.py install
Hopefully you won't receive any error messages. Open an Anaconda's Python session (using the command python) and test if Scikit-Bio was installed rightly using print(skbio.art).
By the way, I've previously installed Visual Studio 2015 Community Edition with C++ SDK features enabled, in order to meet the compiler requirements for the package (Scikit-Bio) installation.
At this time, scikit-bio doesn't officially support windows. We'd definitely be interested in hearing about people's efforts to install, test, and use scikit-bio on Windows, but we don't have developers with expertise in this area.
This is related to biocore/skbio#941.

Verify thread-safety MySQLdb (Python) prior to Trac installation

I'm trying to install Trac manually for the first time. I don't want to use a one-click-installer like Bitmani, I want to learn how to install Trac manually, so I'm following the instructions carefully. I'm installing it in a Windows localhost for now, before installing it in a Linux environment.
As I follow the instructions carefully, I needed to install Python+MySQLDb, and I read this:
thread-safety is important
(...) verify that it is thread-safe by calling MySQLdb.thread_safe() from a standalone Python script (i.e., not under Apache). If the stand-alone test reports that MySQLdb is indeed thread-safe (...)
I've just installed MySQLDb 1.2.4 and I'd like to verify this. I've Googled but I haven't found an example about this, and I have no idea about Python. How can I verify if I've got a thread-safe installation?
Run this command. If you get 1 in the output, your installation is threadsafe.
python -c "import MySQLdb ; print MySQLdb.thread_safe()"

Print Webkit report gives Error

I'm using 64 bit Ubuntu 12.04. When i'm installed wkhtmltopdf package. When I print web kit report it's show following error.
Wkhtmltopdf library path is not set
Please install executable on your system (sudo apt-get install wkhtmltopdf) or download it from here: http://code.google.com/p/wkhtmltopdf/downloads/list and set the path in the ir.config_parameter with the webkit_path key.Minimal version is 0.9.9
Please Help me to configure the webkit package
I had the same issue, i solved mine using this one
http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.11.0_rc1-static-amd64.tar.bz2
everything else is same as #Adrian Merrall explained.
Easiest is to just head to http://wkhtmltopdf.org/ and grab the 64 bit download rather than use the deb package (although that should work too).
Unpack it somewhere and ensure the same user running OpenERP has execute rights on it.
Test from bash with wkhtmltopdf --version
In OpenERP - Settings -> Parameters -> System Parameters -> webkit_path
Set to the full path, e.g.
/usr/local/bin/wkhtmltopdf
and you should be in business

using RSPython in MacOSX

I am trying to install the
R/SPlus - Python Interface (RSPython) on my Mac OS X 10.4.11 with R version 2.7.2 (2008-08-25) and python 2.6.2 from fink.
The routine:
sudo R CMD INSTALL -c RSPython_0.7-1.tar.gz
produced this error message:
* Installing to library '/Library/Frameworks/R.framework/Resources/library'
* Installing *source* package 'RSPython' ...
checking for python... /sw/bin/python
Python version 2.6
Using threads
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
ERROR: configuration failed for package 'RSPython'
** Removing '/Library/Frameworks/R.framework/Versions/2.7/Resources/library/RSPython'
The config.log was not created o my system.
The contact e-mail address to the author does not work anymore, so I just hope somebody here tried the same already or can give me an alternative for running R routines in python.
Best regards,
Simon
To debug this, simply unpack the tar file yourself (tar xzvf RSPython_0.7-1.tar.gz) and run ./configure in the directory created. You should get a config.log file that you can examine.
Try running R CMD CHECK RSPython_0.7-1.tar.gz
That should produce at least produce bunch of logs in a RSPython.Rcheck folder
You might get some clues in there.
Update ---
If you can get one of the other packages to work I'd recommend it. On my system (R 2.9.1 using system python (2.6) in /usr/bin/python), install works but then RSPython fails to run due to problems inside its .First.lib function. I expect you would need to hack the sources considerably to get it to work.
I found the rpy and rpy2 packages and going to try those as an alternative to the older RSPython.
rpy2 is includes in fink's unstable distribution ... well, and it just works fine.

Categories