I'm trying to use the /opt/moose/miniconda/bin/python
environment (an environment set up by my work) to work on some separate code and am getting an error when trying to use the nose module to run tests.
To walk back where my problem began, I received this error when running:
pip install nose
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/opt/moose/miniconda/lib/python2.7/site-packages/nose'
Consider using the `--user` option or check the permissions.
So I then ran
pip install nose --user
The scripts nosetests and nosetests-2.7 are installed in '~/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
So I then added to my ~/.bashrc file
export PATH=$PATH:~/.local/bin
Now when I open a python interpreter in my home directory I can successfully run:
Python 2.7.15 |Anaconda, Inc.| (default, Dec 14 2018, 13:10:39)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import nose
>>> nose.main()
----------------------------------------------------------------------
Ran 0 tests in 0.002s
OK
But, when I move to the directory that I want to actually run the tests in, I get:
$ cd Documents/projects/neml
$ python
Python 2.7.15 |Anaconda, Inc.| (default, Dec 14 2018, 13:10:39)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import nose
>>> nose.main()
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6
Any idea why I'm getting this error, it appears that I am running the same python in both directories. This seems like an environment issue, but if it's not, please point me in the right direction. Thanks.