GithubHelp home page GithubHelp logo

Comments (16)

kpeeters avatar kpeeters commented on August 25, 2024

You need to give a bit more detail. Did you do all the brew install steps in the installation instructions? Are you perhaps on a system that also has Anaconda installed?

from cadabra2.

dchorazkiewicz avatar dchorazkiewicz commented on August 25, 2024

Hi,

I have done all brew install without errors and yes I have anaconda. Is this a problem ? Shell I uninstall it?
My current PYTHONPATH variable is empty. Bellow you can find a ls|grep from brew installation

wrouser:Cellar user$ pwd
/usr/local/Cellar
wrouser:Cellar user$ ls -l |grep python
drwxr-xr-x 3 user admin 102 Apr 24 10:33 boost-python
drwxr-xr-x 3 user admin 102 Apr 24 10:06 python
drwxr-xr-x 3 user admin 102 Apr 24 10:00 python3
wrouser:Cellar user$

from cadabra2.

kpeeters avatar kpeeters commented on August 25, 2024

The problem is probably that the Anaconda python is first in your PATH, or that /usr/local/bin/python3 is a symlink to the Anaconda python. What do you get if you do
which python3 from a terminal? In order to change this, you need to make sure that /usr/local/Cellar/bin/python3 is picked up when you type python3.

from cadabra2.

dchorazkiewicz avatar dchorazkiewicz commented on August 25, 2024

You are right!
wrouser:Cellar user$ which python3
/Users/user/anaconda/bin/python3
wrouser:Cellar user$

Do you know how to change it to brew instalattion?

from cadabra2.

kpeeters avatar kpeeters commented on August 25, 2024

Your ~/.bashrc file probably has a modification which puts the Anaconda path in. Strip that out and it will work. Alternatively, do

export PATH=/usr/local/Cellar/bin:${PATH}

in the terminal before you run the Cadabra configuration/build/install steps.

from cadabra2.

dchorazkiewicz avatar dchorazkiewicz commented on August 25, 2024

Better, installation has finished but...

wrouser:build user$ cadabra2-gtk

(process:2455): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
2017-04-24 14:23:38.380 cadabra2-gtk[2455:336975] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
cadabra-client: spawning server

(cadabra2-gtk:2455): Gdk-WARNING **: GdkQuartzDisplay does not implement the monitor vfuncs
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Traceback (most recent call last):
File "", line 1, in
File "/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named 'cadabra2_defaults'

libc++abi.dylib: terminating with uncaught exception of type std::logic_error: Failed to read port from server.
Abort trap: 6
wrouser:build user$ cadabra2
Traceback (most recent call last):
File "/usr/local/bin/cadabra2", line 23, in
from cadabra2 import *
ModuleNotFoundError: No module named 'cadabra2'
wrouser:build user$

from cadabra2.

dchorazkiewicz avatar dchorazkiewicz commented on August 25, 2024

Why those line are present

Install the project...
-- Install configuration: ""
-- Installing: /Users/user/anaconda/lib/python3.6/site-packages/cadabra2.so
-- Installing: /Users/user/anaconda/lib/python3.6/site-packages/cadabra2_defaults.py

It want to use anaconda but currently
which python3
/usr/local/bin/python3

from cadabra2.

kpeeters avatar kpeeters commented on August 25, 2024

Can you erase the build directory completely, then re-run cmake .. and see what the line -- Python site path at... says?

from cadabra2.

dchorazkiewicz avatar dchorazkiewicz commented on August 25, 2024

Yeah!

I have copied those two file to site-packages to
/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6./lib/python3.6/site-packages and i have GUI with WARNINGs:

cadabra2-gtk

(process:2528): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
2017-04-24 14:37:04.098 cadabra2-gtk[2528:373095] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
cadabra-client: spawning server

(cadabra2-gtk:2528): Gdk-WARNING **: GdkQuartzDisplay does not implement the monitor vfuncs
cadabra-client: connect done
wrochorazkiewiczd:build chorazkiewiczd$ cadabra2-gtk

(process:2532): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
2017-04-24 14:37:28.911 cadabra2-gtk[2532:375754] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
cadabra-client: spawning server

(cadabra2-gtk:2532): Gdk-WARNING **: GdkQuartzDisplay does not implement the monitor vfuncs
cadabra-client: connect done

I need to test some notebooks

from cadabra2.

dchorazkiewicz avatar dchorazkiewicz commented on August 25, 2024

-- Found python /usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6.dylib
-- Python include dirs: /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/include/python3.6m
-- Python site path at /Users/chorazkiewiczd/anaconda/lib/python3.6/site-packages

and Schwarzschild notebook run correctly :). I do not know why but under linux latex rendering is much faster!

from cadabra2.

kpeeters avatar kpeeters commented on August 25, 2024

Ok, those warnings are not show-stoppers, I get them myself as well, has to do with gtk, not cadabra.

Can you test to see that if you now do make and sudo make install it indeed installs cadabra2_defaults.py to that path? I suspect you had some leftovers in the cmake config from when you still had Anaconda's python first.

And as to why LaTeX rendering is faster on Linux: Linux is much faster at starting processes and reading loads of small files than MacOS. Do like I did and install Linux on that Mac.

from cadabra2.

kpeeters avatar kpeeters commented on August 25, 2024

Hold on, didn't read that correctly. It did not pick up the right Python site path. Ok, will fix that.

from cadabra2.

dchorazkiewicz avatar dchorazkiewicz commented on August 25, 2024

Ok i've removed build folder and again cmake ....... and now
log.txt

from cadabra2.

dchorazkiewicz avatar dchorazkiewicz commented on August 25, 2024

For now it works, but idea with virtualisation is great!

Cadabra + sympy this is what i need :)
Thank you very much for help!

from cadabra2.

kpeeters avatar kpeeters commented on August 25, 2024

If you have any suggestions on how to improve the interaction between cadabra and sympy, don't hesitate to get in touch.

from cadabra2.

kpeeters avatar kpeeters commented on August 25, 2024

That last log you sent shows that everything does work as expected: if you have the HomeBrew python3 first in your path, cmake will pick it up, and install cadabra2_defaults.py in the HomeBrew python package directory. I'm closing this now, but please re-open if necessary.

from cadabra2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.