I have installed Install the F# Cross-Platform Runtime (called Mono) from this instruction. The installation completed without errors, but I cannot find fsharp:
~ ยป fsharpi
zsh: command not found: fsharpi
How can I find the path to installed files?
Well, it looks like maybe it isn't symlinked.
Here's some notes I made going through the same attempts:
http://compositecode.com/2015/05/07/os-x-and-f-clone-it-build-it-install-it-hack-it/
http://compositecode.com/2015/05/15/simplifying-bash-repl-use-with-f/
Related
I am trying to build opencv library under cygwin and I am following this tutorial.
Previously I have installed cygwin, gcc compiler package and cmake package, version 3.1.2. However, when I type in cmake command, nothing happens. It does not give any error messages or exit, just seems to be doing it perpetually.
Please, give me any idea of what I am doing wrong.
I found a solution and post it in this question: Getting cmake to work under Cygwin on Windows 7.
In a word: run cmd.exe as administrator, and mklink a soft link from {cygwin64}/share/ to {cygwin64}/usr/share/, such as:
mklink /J share usr\share
Situation:
In my Mac Os 10.8.5 I have available python2.7 and python2.7-32 with latest cx_freeze(-4.3.2).
I need cx_freeze to pick the python2.7-32 version so my executable app can use a 32-bit version of OpenCV.
So far, all attempts to use cx_freeze script suggest that it bundles python2.7(which is 64bit) and the app fails to execute with: "cv2.so: mach-o, but wrong architecture"
(This is the same error you would get if you try to import OpenCV built in 32 bits, with a python interpreter of 64)
Is there a way to "force" cxfreeze to bundle a specific python version installed (in this case python2.7-32) in the executable it produces?
Edit:
I've also tried to build cx-freeze from source in 32-bit using:
python2.7-32 setup.py build;
python2.7-32 setup.py install
No matter what, the app generated is still a 64bit version:
$ python2.7-32 setup.py bdist_dmg
$ file capturebasic
capturebasic: Mach-O 64-bit executable x86_64
$ arch -i386 ./capturebasic
arch: posix_spawnp: ./capturebasic: Bad CPU type in executable
Edit2:
It seems that Mac's cx_freeze you download from sourceforge is only 64-bit:
http://sourceforge.net/projects/cx-freeze/files/4.3.2/
If you want to create 32-bit apps, you need the 32-bit version of cx_freeze.
I'm confirming if there's any way to install the 32bit version in Mac in cx_freeze's mailing list.
I believe you do not have to touch your setup script, but just change the command used to build it. For instance instead of using python setup.py build, you would use the command python2.7-32 setup.py build. You may have to specify the path to the python2.7-32 exe. so something like path\to\python2.7-32.exe setup.py build. Note: I use windows so the example commands I used might be a little different on mac, like instead of .exe it's .app.
Hope this helped.
Decided to try out F# for the first time on my Mac (OSX 10.8, XCode 4.4). I downloaded Mono 3.0.3 and attempted to compile a simple "Hello World" program. It didn't go well:
$ cat Hello.fs
printfn "Hello, World!"
$ /Library/Frameworks/Mono.framework/Versions/3.0.3/bin/fsharpc Hello.fs
F# Compiler for F# 3.0 (Open Source Edition)
Freely distributed under the Apache 2.0 Open Source License
$ ./Hello.exe
zsh: exec format error: ./Hello.exe
$ file Hello.exe
Hello.exe: PE32 executable for MS Windows (console) Intel 80386 32-bit Mono/.Net assembly
I looked through the output of fsharpc --help to see if there was an obvious flag for producing the correct type of binary, but nothing seemed particularly helpful. I'm assuming that there's something really obvious I need to do to enable this, but I can't seem to figure it out.
I just realized that I was supposed to do mono Hello.exe. I'll leave this around in case somebody else doesn't read the Mono documentation before trying to compile some code ;)
I am trying to install Rails on OS X 10.7.5, using Homebrew and continue to receive the below Warning. I have tried many times to change the PATH to exclude the Python Directories (modifying .bash_profile, but am not even sure this is what is causing the Warning. Apologies if this is serious noob territory, but I could not find anything helpful after hours of searching. Homebrew warning:
Warning: "config" scripts exist outside your system or Homebrew directories.
./configure scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
/Library/Frameworks/Python.framework/Versions/Current/bin/python-config
/Library/Frameworks/Python.framework/Versions/Current/bin/python2.5-config
/opt/sm/pkg/active/bin/curl-config
/opt/sm/pkg/active/bin/ncurses5-config
/opt/sm/pkg/active/bin/ncursesw5-config
/opt/sm/pkg/active/bin/pkg-config
/opt/sm/pkg/active/bin/xml2-config
/opt/sm/pkg/active/bin/xslt-config
I think you should make installation of Rails using gem tool . Rails is just a gem and in should not be installed by homebrew . First install the newest version of Ruby , then google a little about gem management system and give it a go . Here is a nice Railscast on the subject.
this is my first question to post.
I am working with python at the moment (on mac os 10.6.8), and have struggled for the lack of an ide. I have been using a version of emacs that offers syntax highlighting, but does not offer the ability to browse variable values without print statements. What I was looking for was the equivalent of eclipse, which basically died on my machine when I upgraded from 10.4.11 to 10.6.8. I've not been successful resurrecting it. Time to move on.
My graduate advisor suggested spyder, and last night I bit the bullet, installing macports and (apparently) spyder, successfully.
The problem I'm having is HOW do I start spyder once installed. Apparently, python spyder.py is not the approach to use. Elsewhere (not here) I saw a post that suggested that there was supposed to be a batch executable that I should be able to find by typing
which spyder
This yielded nothing.
The spyder documentation (located at http://packages.python.org/spyder/options.html) suggests that the command
python spyder.py
is the way to go. Here is the result:
Bobs-Machine:spyderlib robertlilly$ python spyder.py
Traceback (most recent call last):
File "spyder.py", line 31, in
from spyderlib import qt #analysis:ignore
ImportError: No module named spyderlib
Most of my searches here have just pointed out that one should use MacPorts for the install, nothing after that. The readme included the macports spyder install, I thought, didn't provide sufficient direction.
If anybody knows where to look, that would be great.
Regards,
Robert
For me, I installed the macports package py37-spyder. In /opt/local/bin there is the package there, spyder-3.7. Launching that works already. In order to make that the default, I have to run
sudo port select --set spyder spyder-37
Then I can run it directly as
spyder from Terminal. If you want to see which versions of spyder are available on your system, then
port select --list spyder
will tell you the versions you have.
Macports should install a spyder binary to /opt/local/bin/spyder, or thereabouts. If you already have /opt/local/bin/ in your PATH variable, then just run:
$ spyder &
Or more explicitly:
$ /opt/local/bin/spyder &
...if you don't have the PATH setup. Hope that helps.
I just recently installed spyder via MacPorts.
(the command I chose was sudo port install py27-spyder, which installed Spyder v.2.2.3 on Mac OS 10.7.5 & Python 2.7.5)
At the end of the Spyder installation, the terminal showed "use command spyder to launch" (or something to that effect)
So, for me, I simply had to type spyder into a terminal to launch it. Your error referring to missing spyderlib might mean that your spyder installation did not in fact complete properly. (I have found it's not uncommon to have to track down 2-3 weird bugs and dependencies for complex MacPorts installs).
If you find it did complete properly, then perhaps the MacPorts directory was not added to your PATH. It you open ~/.profile, you should seen that MacPorts added it's directory to the shell's search path. Here's what the MacPorts installer added to my .profile:
# MacPorts Installer addition on 2012-11-19_at_17:16:31: adding an appropriate PATH variable fo$
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
To make a Mac OS-friendly icon to launch Spyder, I then made a new text file (I did it with Terminal.app>pico) containing the following text:
#!/bin/bash
spyder
and saved the file as spyder.command. This file is now double-clickable and will launch Spyder (and an alias to it can have a more normal name like "Launch Spyder"). Throw it into the /Applications folder & make an Icon for it via /Utilities/Icon Composer.app (grab the Spyder icon on the website) and it's like a Pythonic Matlab!