pygae / galgebra

Symbolic Geometric Algebra/Calculus package for SymPy :crystal_ball:
https://galgebra.rtfd.io/
BSD 3-Clause "New" or "Revised" License
233 stars 62 forks source link

Fix installation in virtual environment (brombo/galgebra#41) #122

Closed eric-wieser closed 4 years ago

eric-wieser commented 4 years ago

@mevangelista-alvarado commented on Jan 15

I installed galgebra the following the instructions from https://github.com/brombo/galgebra/blob/master/doc/GAlgebraPrimer.pdf, but when installing galgebra via virtual environment I get the following error "module 'site' has no attribute 'getsitepackages'"

I fix this error modifying the file venv/lib/python2.7/site-packages/galgebra/galgebra/setgapth.py

try:
    dist_pkgs = site.getsitepackages()[-1]
except:
    dist_pkgs = os.path.dirname(site.__file__) + '/site-packages'

This answer is based on QQuick/Transcrypt#13

@utensil commented on Feb 25 • edited

@mevangelista-alvarado There is a community fork pygae/galgebra maintained by Pythonic Geometric Algebra Enthusiasts because brombo/galgebra is no longer actively maintained.

The fork supports Python 3, adds tests and CI, maintains releases to PyPI, adds docs and has many bug fixes.

PyPI PyPI - Python Version Build Status Documentation Status Codacy Badge Codecov

In the fork, the setgapth.py way to install is deprecated by pip install galgebra and all modules in galgebra should be imported from galgebra, for example:

from galgebra.printer import Format, Eprint, Get_Program, latex, GaPrinter
from galgebra.ga import Ga, one, zero
from galgebra.mv import Mv, Nga
# for backward compatibility
from galgebra.mv import MV, ONE, ZERO, HALF
from galgebra import ga
from galgebra import utils

Please let us know if this helps with the problem.

@nwikner commented on Jun 13

Well, it sure helps me! I've been struggling with this for weeks, and only came upon this post by accident. It is unfortunate that there is still documentation out there, including in the Linear and Geometric Algebra website, which points to the old repository and has out-of-date instructions for installation and use.

@mevangelista-alvarado commented on Jun 13

Bueno, seguro que me ayuda! He estado luchando con esto durante semanas, y solo encontré este mensaje por accidente. Es desafortunado que todavía haya documentación, incluso en el sitio web de Álgebra Lineal y Geométrica, que apunta al antiguo repositorio y tiene instrucciones obsoletas para la instalación y el uso.

I recommened that you use new galgebra, it also works in Python 2.x and 3.x

@utensil commented on Jun 13

It is unfortunate that there is still documentation out there, including in the Linear and Geometric Algebra website, which points to the old repository and has out-of-date instructions for installation and use.

Yeah, we've noticed this too. pygae#28 is to address this: we need to make sure the references to GAlgebra is still valid except for the new location to maintain it and new ways to install it.

We plan to request to update the references after the pygae#17 is merged (it's currently in final review stage) and version bumps to 0.4.4, the PR ensured many of the examples to actually work under Python 3 and fixed many issues along the way.

Well, it sure helps me!

We're so glad that it's helpful. We're also working on a Julia wrapper GAlgebra.jl with syntactic (like directly using v ∧ A, v ⨼ A etc.) and functional additions (the latter will be backported to the python version when more stabilized.

I recommened that you use new galgebra

Thanks for the recommendation! 😄


From http://webcache.googleusercontent.com/search?q=cache:https://github.com/brombo/galgebra/issues/41

eric-wieser commented 4 years ago

I think this can be closed too, it should install through pip / setuptools like any other module now.