JeS24 on main
Updated README.rst to fix build… (compare)
Hi! I may have found a found a bug in einsteinpy. Either that or I have a fundamental misunderstanding about how to use it. The Riemann curvature tensor should always be skew symmetric: R_abcd = -R_abdc. However in the following example this is not the case. I am working with a 2D metric with line element ds^2 = -2 du dr - K(u, r) du^2:
from einsteinpy.symbolic import MetricTensor, RiemannCurvatureTensor
syms= sympy.symbols("u r")
u, r = syms
K = sympy.Function("K")(u, r)
metric_array = [[-K, -1], [-1, 0]]
metric = MetricTensor(metric_array, syms)
rie = RiemannCurvatureTensor.from_metric(metric)
rie = rie.change_config("llll")
rie == -rie # Returns False
The last line should return true for any valid Riemann tensor if I understand correctly, but the R_urru component gives zero. Have I made a mistake or is this a bug? Am I accessing the tensor components incorrectly perhaps?
pip install git+https://github.com/einsteinpy/einsteinpy.git.
pip install einsteinpy. This would install einsteinpy-0.3.1 (AKA "stable"). What you want is einsteinpy-0.4.dev0 (AKA "latest"), that you can install via
pip install git+https://github.com/einsteinpy/einsteinpy.git. This pulls the most recent code from our GitHub repo. The documentation for this version can be found at https://docs.einsteinpy.org/en/latest .
pip uninstall einsteinpybefore you install the latest version.
tandersen@tomm1 bin % ./conda init zsh
no change /opt/homebrew/Caskroom/miniforge/base/condabin/conda
no change /opt/homebrew/Caskroom/miniforge/base/bin/conda
no change /opt/homebrew/Caskroom/miniforge/base/bin/conda-env
no change /opt/homebrew/Caskroom/miniforge/base/bin/activate
no change /opt/homebrew/Caskroom/miniforge/base/bin/deactivate
no change /opt/homebrew/Caskroom/miniforge/base/etc/profile.d/conda.sh
no change /opt/homebrew/Caskroom/miniforge/base/etc/fish/conf.d/conda.fish
no change /opt/homebrew/Caskroom/miniforge/base/shell/condabin/Conda.psm1
no change /opt/homebrew/Caskroom/miniforge/base/shell/condabin/conda-hook.ps1
no change /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/xontrib/conda.xsh
no change /opt/homebrew/Caskroom/miniforge/base/etc/profile.d/conda.csh
==> For changes to take effect, close and re-open your current shell. <==
tandersen@tomm1 bin % pwd
Hi! Sorry for bothering for the very first day, but I noticed that the pip installing is complaining that
einsteinpy requires Python '>=3.7' but the running Python is 2.7.17
while I just installed python 3.8, and also the alias "python" points to that one, so why does it search for the oldest python? How can I force it to choose the 3.8 version I installed?
Installing collected packages: UNKNOWN
Running setup.py install for UNKNOWN ... error
Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-Ycu7Ai-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-oH81vU-record/install-record.txt --single-version-externally-managed --compile:
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'setup_cfg'
writing top-level names to UNKNOWN.egg-info/top_level.txt
writing dependency_links to UNKNOWN.egg-info/dependency_links.txt
writing manifest file 'UNKNOWN.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
reading manifest file 'UNKNOWN.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching '*.py' under directory 'src/einsteinpy/tests' warning: no files found matching '*.html' under directory 'src/einsteinpy/tests' no previously-included directories found matching 'docs/source/examples/.ipynb_checkpoints' warning: no previously-included files matching '*.py[cod]' found anywhere in distribution warning: no previously-included files matching '__pycache__' found anywhere in distribution warning: no previously-included files matching '*.so' found anywhere in distribution warning: no previously-included files matching '*.dylib' found anywhere in distribution writing manifest file 'UNKNOWN.egg-info/SOURCES.txt' Copying UNKNOWN.egg-info to /usr/lib/python2.7/site-packages/UNKNOWN-0.0.0-py2.7.egg-info error: /usr/lib/python2.7/site-packages/UNKNOWN-0.0.0-py2.7.egg-info: Permission denied ----------------------------------------
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-Ycu7Ai-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-oH81vU-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-Ycu7Ai-build/