Install Yaml

Having trouble installing or compiling FreeCAD? Get help here.
Jee-Bee
Posts: 2012
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Install Yaml

Postby Jee-Bee » Mon Jun 22, 2015 4:03 pm

I want to try to install yaml on my mac.
First i found that there multiple versions of Yaml. Because of python version 2.7 i choose py27-yaml

Code: Select all

$ python --version
Python 2.7.3
But now i get the following error with with Xcode. I have OSX 10.8.5 and X Code 5.1.1 is the highest verion i can download.
I think i have some probles with an earlier version of X code. How can i fix this?

Code: Select all

$ sudo port install py27-yaml
Error: 
Error: No valid Xcode installation is properly selected.
Error: Please use xcode-select to select an Xcode installation:
Error:     sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer # version 5.1.1
Error: 
Error: The installed version of Xcode (2.0orlower) is too old to use on the installed OS version. Version 4.6.3 or later is recommended on Mac OS X 10.8.
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port py27-yaml failed
pablogil
Posts: 820
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: Install Yaml

Postby pablogil » Tue Jun 23, 2015 5:41 pm

I don't get the same error but as not been an expert on Terminal or coding I don't know how to correctly install YAML in OSX.
Jee-Bee, could you show me how it should be done and then I tell you what I get?

Thank you
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
Jee-Bee
Posts: 2012
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Install Yaml

Postby Jee-Bee » Tue Jun 23, 2015 6:40 pm

I try now to delete my old Developers tools version. And try then again.
pablogil wrote:I don't get the same error but as not been an expert on Terminal or coding I don't know how to correctly install YAML in OSX.
me neither but i'm trying...
Jee-Bee
Posts: 2012
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Install Yaml

Postby Jee-Bee » Wed Jun 24, 2015 12:58 pm

My first error was this:

Code: Select all

Error: The installed version of Xcode (2.0orlower) is too old to use on the installed OS version. Version 4.6.3 or later is recommended on Mac OS X 10.8.
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port py27-yaml failed
bash-3.2$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer # version 5.1.1
The solution was quite simple. I had to tell where Xcode was. so type:

Code: Select all

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer # version 5.1.1 
After that

Code: Select all

sudo port install py27-yaml
i think (python 2.7 at least that was what i thought).
for other versions try

Code: Select all

port search yaml
and search in the list.

So I'm one step further. Stil one error to go. By starting FreeCAD i get this error in the Terminal

Code: Select all

read console log for details 
Traceback (most recent call last):
-->    File "/Users/jan-berttewinkel/FreeCAD/build/Mod/plugins/pluginloader.py", line 343, in __init__
    config3=set_defaults(config3)
-->    File "/Users/jan-berttewinkel/FreeCAD/build/Mod/plugins/pluginloader.py", line 144, in set_defaults
    for key in conf['plugins'].keys():
-->  KeyError: 'plugins'

During initialization the error 'plugins' occurred in /Users/jan-berttewinkel/FreeCAD/build/Mod/plugins/InitGui.py
I don't know yet what to do with it…


Edit: missed Start up error FreeCAD:
Screen Shot 2015-06-24 at 15.03.06.png
Screen Shot 2015-06-24 at 15.03.06.png (29.16 KiB) Viewed 1987 times
Jee-Bee
Posts: 2012
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Install Yaml

Postby Jee-Bee » Wed Jun 24, 2015 1:13 pm

all logic files installed result is still the error...
Jee-Bee
Posts: 2012
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Install Yaml

Postby Jee-Bee » Wed Jun 24, 2015 2:14 pm

maybe it have something to do with this:
http://answers.ros.org/question/9418/pr ... with-yaml/
User avatar
microelly2
Posts: 4690
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Install Yaml

Postby microelly2 » Thu Jun 25, 2015 2:55 pm

I think you have to bring your yaml directory into the search path of your freecad installation

can you try this and post the output of the python window here

Code: Select all


try:
	import yaml
except:

	import sys
	print path
	for p in sys.path:
		print p

print "------------------"
 
import os

# change this to your path
fn='/usr/lib/freecad/Mod/plugins/pluginloaderconfig.yaml'

if os.path.exists(fn):
	print ("exists: " + fn)

	stream = open(fn, 'r').read()
	config3 = yaml.load(stream)
	print config3

	import pprint
	pprint.pprint(config3)
else:
	print ("no file " + fn)