Closed raghavven closed 5 years ago
I assume the install location of the nosetests
program is not in your PATH
. If you are working on a Linux system, you should make sure the following is added to your path: ${HOME}/.local/bin
. This can be done by putting the following line in your .bashrc:
export PATH=${PATH}:${HOME}/.local/bin
It is slightly different (but similar) on a mac, but I don't know it by heart.
Thank you for your kind reply Toon Verstraelen.
The 'nose' is located at /home/subbu/.local/lib/python3.5/site-packages. 'tamkin' and 'tamkin-1.2.4.dist-info' are also located at /home/subbu/.local/lib/python3.5/site-packages.
I pasted the following at the last line of '.bashrc' export PATH=${PATH}:/home/subbu/.local/lib/python3.5/site-packages/nose
And now when I run the command 'nosetests -v tamkin', I get the following error.
Failure: SyntaxError (invalid syntax (partf.py, line 1019)) ... ERROR
======================================================================
ERROR: Failure: SyntaxError (invalid syntax (partf.py, line 1019))
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/subbu/.local/lib/python3.5/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/home/subbu/.local/lib/python3.5/site-packages/nose/loader.py", line 407, in loadTestsFromName
module = resolve_name(addr.module)
File "/home/subbu/.local/lib/python3.5/site-packages/nose/util.py", line 312, in resolve_name
module = __import__('.'.join(parts_copy))
File "/home/subbu/.local/lib/python3.5/site-packages/tamkin/__init__.py", line 39, in <module>
from tamkin.chemmod import *
File "/home/subbu/.local/lib/python3.5/site-packages/tamkin/chemmod.py", line 42, in <module>
from tamkin.partf import PartFun
File "/home/subbu/.local/lib/python3.5/site-packages/tamkin/partf.py", line 1019
print 'WARNING: molecule is too large (%i atoms > 10) to quickly estimate the rotational symmetry number.' % natom
^
SyntaxError: invalid syntax
----------------------------------------------------------------------
Ran 1 test in 0.004s
FAILED (errors=1)
Can you please advice how to overcome this error.
Thanks
Could you try the following line instead in .bashrc
?
export PATH=${PATH}:/home/subbu/.local/bin
Normally, putting the directory with the python library into the PATH variable should not work.
Thank you once again for your swift response.
I am new to the linux environment. I am not sure, if I am pasting things correctly in '.bashrc' file. So I have attached '.bashrc' file for your kind reference.
I pasted the following line at the end of the '.bashrc' file. 'export PATH=${PATH}:/home/subbu/.local/bin'
It gave me the same error.
Can you kindly help.
Thank you. .bashrc.txt
Oh, I should have looked more carefully at your error message. TAMkin is not ported yet to python 3, which is the cause here. Can you try using python 2 instead?
Thank you for your valuable comment.
I ensured, numpy, scipy, matplotlib, molmod, nose and tamkin are all found inside python2.7
I ran the command 'nosetests tamkin' and after running a series of tests, it finally printed the following in the last two lines.
"Ran 126 tests in 99.491s
FAILED (errors=9, failures=10)"
Can you please help me overcome this.
Thanks.
Good, that is already an improvement. It all depends on which errors are failing. Can you run nosetests -v tamkin
to get the detailed list of failing and passing tests? That should provide us with some hints on how to proceed.
TAMkin has become python 3 compatible as of version 1.2.6, which will be released today.
I ran the command 'pip install tamkin --user' and got the following lines.
Collecting tamkin Requirement already satisfied: molmod>=1.3.2 in ./.local/lib/python3.5/site-packages (from tamkin) (1.4.4) Requirement already satisfied: matplotlib>1.1 in /usr/lib/python3/dist-packages (from tamkin) (1.5.1) Requirement already satisfied: numpy>=1.0 in ./.local/lib/python3.5/site-packages (from tamkin) (1.16.4) Requirement already satisfied: nose>=0.11 in ./.local/lib/python3.5/site-packages (from tamkin) (1.3.7) Collecting scipy>=0.17.1 (from tamkin) Using cached https://files.pythonhosted.org/packages/14/49/8f13fa215e10a7ab0731cc95b0e9bb66cf83c6a98260b154cfbd0b55fb19/scipy-1.3.0-cp35-cp35m-manylinux1_x86_64.whl Requirement already satisfied: future in ./.local/lib/python3.5/site-packages (from molmod>=1.3.2->tamkin) (0.17.1) Requirement already satisfied: cython>=0.24.1 in ./.local/lib/python3.5/site-packages (from molmod>=1.3.2->tamkin) (0.29.12) Installing collected packages: scipy, tamkin Successfully installed scipy-1.3.0 tamkin-1.2.4
This looks like TAMkin has been successfully installed with other associated dependencies.
But when I run the command 'nosetests -v tamkin', it gives me an error saying
'The program 'nosetests' is currently not installed. You can install it by typing: sudo apt install python-nose'
Kindly advice how to go about it.
Thanks