Comments (6)
Could this be the same issue as reported here: lucasb-eyer/pydensecrf#28. If yes, the solution would be to install libgcc in conda:
conda install libgcc
There could be other reasons for this, so please let us know if it worked. Mixing up conda compilers with the ones from your Linux distribution is often a source of confusion.
from horton.
Okay I think that worked for the conda version. Thanks.
I'm still trying to get the github version to work though. When I try to import horton from the github repository that I forked, I get the following error:
(py27) jgarne01@oryx:~/ExtraDrive/githubcode/horton$ python
Python 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23:09:15)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import horton
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "horton/__init__.py", line 28, in <module>
from horton.cext import *
ImportError: No module named cext
When I try to import horton anywhere else, it works. This version of horton is listed in my "conda list".
horton 2.1.0 <pip>
Here are the tests that I ran using nosetests:
======================================================================
ERROR: horton.part.test.test_proatomdb.test_compute_radii
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/jgarne01/anaconda3/envs/py27/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/jgarne01/anaconda3/envs/py27/lib/python2.7/site-packages/horton/part/test/test_proatomdb.py", line 128, in test_compute_radii
record = padb.get_record(6, 0)
File "/home/jgarne01/anaconda3/envs/py27/lib/python2.7/site-packages/horton/part/proatomdb.py", line 358, in get_record
return self._map[(number, charge)]
KeyError: (6, 0)
======================================================================
ERROR: horton.part.test.test_proatomdb.test_get_spline
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/jgarne01/anaconda3/envs/py27/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/jgarne01/anaconda3/envs/py27/lib/python2.7/site-packages/horton/part/test/test_proatomdb.py", line 172, in test_get_spline
spline = padb.get_spline(6)
File "/home/jgarne01/anaconda3/envs/py27/lib/python2.7/site-packages/horton/part/proatomdb.py", line 597, in get_spline
rho, deriv = self.get_rho(number, parameters, combine, do_deriv=True)
File "/home/jgarne01/anaconda3/envs/py27/lib/python2.7/site-packages/horton/part/proatomdb.py", line 547, in get_rho
record = self.get_record(number, charge)
File "/home/jgarne01/anaconda3/envs/py27/lib/python2.7/site-packages/horton/part/proatomdb.py", line 358, in get_record
return self._map[(number, charge)]
KeyError: (6, 0)
======================================================================
FAIL: horton.part.test.test_proatomdb.test_db_basics
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/jgarne01/anaconda3/envs/py27/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/jgarne01/anaconda3/envs/py27/lib/python2.7/site-packages/horton/part/test/test_proatomdb.py", line 32, in test_db_basics
assert padb.get_numbers() == [1, 8]
AssertionError
======================================================================
FAIL: horton.part.test.test_proatomdb.test_io_group
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/jgarne01/anaconda3/envs/py27/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/jgarne01/anaconda3/envs/py27/lib/python2.7/site-packages/horton/part/test/test_proatomdb.py", line 103, in test_io_group
assert padb1.size == 5
AssertionError
======================================================================
FAIL: horton.part.test.test_proatomdb.test_io_filename
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/jgarne01/anaconda3/envs/py27/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/jgarne01/anaconda3/envs/py27/lib/python2.7/site-packages/horton/part/test/test_proatomdb.py", line 116, in test_io_filename
assert keys == [(1, 0), (6, 0), (6, 1)]
AssertionError
======================================================================
FAIL: horton.scripts.test.test_atomdb.test_plot_atoms
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/jgarne01/anaconda3/envs/py27/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/jgarne01/anaconda3/envs/py27/lib/python2.7/site-packages/horton/scripts/test/test_atomdb.py", line 209, in test_plot_atoms
check_files(dn, fns)
File "/home/jgarne01/anaconda3/envs/py27/lib/python2.7/site-packages/horton/scripts/test/common.py", line 39, in check_files
assert os.path.isfile(os.path.join(dn, fn)), "Missing %s" % fn
AssertionError: Missing dens_001__h.png
----------------------------------------------------------------------
Ran 979 tests in 205.954s
FAILED (SKIP=1, errors=2, failures=4)
from horton.
You need to take the step explained here, in case you work with the version from git:
http://theochem.github.io/horton/2.1.0/tech_dev_git.html#reference-atoms
Also, when you just get the version from git, the c extensions still have to be built, just like when you install from source. This is why you get the error ImportError: No module named cext
. You either do a complete install of the git version (and uninstall the other version first) or you can do an in-place build with ./setup.py build_ext -i
. Also keep in mind that the current latest version from git works with libxc-3.0.0.
In any case, I would strongly recommend to work only with one version of HORTON at a time on your system. Having two versions, like you do now, may give you a lot of confusion error messages.
from horton.
Okay, I have removed all of the versions of horton and just installed the github version. I can import horton from anywhere except the horton github directory (in that case, it gives the ImportError: No module named cext
). What is the expected behaviour when importing from the horton directory? Should it work or do I have to something extra?
from horton.
Never mind my last comment. It seems that when I installed horton without the user argument it put my files in the correct anaconda environment directory. You can close this issue now if you'd like.
from horton.
Both observations seem to be the normal behavior. (i) When you import a package in Python, it will first look for that package in the current directory, which in this case does not work because the cext.so file is not there. (ii) The --user
option should indeed not be used when you want to install into conda or virtualenv.
from horton.
Related Issues (20)
- Macports Libxc release too aggresive HOT 1
- Rapid deployment to Github, PyPI and anaconda.org HOT 4
- Decide on final docstring format HOT 2
- Move coverage to codecov HOT 1
- Feature request: localization module HOT 5
- horton-2.1.0 does not install on latest fedora 26 & 27 HOT 27
- Conda install on Travis HOT 2
- cython error when building horton-2.1.0 on Mac OS High Sierra HOT 5
- Issues with Ubuntu 18.04 HOT 6
- GCC error when trying to install horton HOT 4
- Which new module for Atoms-in-Molecules analysis HOT 7
- Compilation error in cext.cpp HOT 1
- No module named cext HOT 1
- URL in 'About' section does not resolve HOT 2
- Computing atom-in-molecule electron densities
- Point-charge-interaction integrals for each point
- tar.gz is a tar
- The ordering of P orbitals for pure Gaussian functions HOT 6
- getting module error while using Horton package
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from horton.