Comments (12)
Hi @olakusiak I haven't encountered this error message before but sorry this is giving you trouble. It looks like the cython extensions are not being recognized for some reason. Have you tried installing through the conda-forge channel? That usually ensures internally consistent dependencies of all relevant packages.
I just double-checked on my local machine (which is also macOS Catalina 10.15.7) and I can compile and install using cython 0.29.22. So in case using the conda-forge channel does not resolve the issue (or in case you already were using conda-forge when you tried installing into a virtualenv) then would you mind trying downgrading to cython 0.29.22 to see if that solves the problem?
from halotools.
Hi,
I am encountering the same issue on my Mac.
Downgrading to Cython 0.29.22 didn't solve the issue :/ (same error message as above)
Boris
from halotools.
Ok, thanks for confirming the problem @borisbolliet - are you also using pip or have you tried installing with conda?
from halotools.
thanks @aphearin for the suggestions. I tried both conda-forge and downgrading cython, and none helped
from halotools.
Ok thanks for the diligence @olakusiak. I'm having trouble reproducing the error locally, but I'll keep trying. In the meantime, would you be able to supply a full error/build log?
from halotools.
Ok I just tried the following environment configuration and installation test on a macOS Catalina 10.15.7:
$ conda create -n testenv python=3.7 halotools=0.7 h5py ipython jupyter matplotlib cython pytest-astropy
$ conda activate testenv
$ ipython
>>> import halotools
>>> halotools.test_installation()
When I call the installation test within the testenv environment as above, I get no errors. Would you mind trying again using this same virtual conda environment?
from halotools.
@aphearin that works perfectly, thank you! (I was also able to install it without any trouble with pip on a cluster)
from halotools.
Ok, great! I wonder if maybe the problem was resolved by installing pytest-astropy? I'll update the installation docs to include that from now on. In any case, please do let me know if you encounter any other problems with v0.7 by reopening this issue and tagging me.
from halotools.
Somehow I am still encountering the same error. I attach the error log:
error.log
(I am working with Ola so we can figure out together)
Thank you so much for the fast response!
from halotools.
Hmm, @borisbolliet is it possible that you are executing the test suite from within the root halotools directory that contains the source code of halotools? I'm not sure, but I think that is what the following lines of your error log indicates:
platform darwin -- Python 3.7.10, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /Users/boris/Work/CLASS-SZ/SO-SZ/halotools, configfile: setup.cfg
If that is the case, then this would produce this error, so could you try repeating the same call to the installation test, exactly as you have done, but first cd into some other working directory that is separate from the halotools repo:
$ conda create -n testenv python=3.7 halotools=0.7 h5py ipython jupyter matplotlib cython pytest-astropy
$ conda activate testenv
$ cd /some/random/working/directory/away/from/halotools
$ ipython
>>> import halotools
>>> halotools.test_installation()
from halotools.
That works ! very good
Thank you so much,
Boris
from halotools.
Ok, glad this is resolved @borisbolliet. Just FYI, here is what was happening. This has to do with the general way the python interpreter handles your paths and not halotools per se.
Whenever you initiate an import of some module/package, the interpreter first looks in your current local directory for that package. If it does not find it, then it moves to the next location in your path sequence. In your case here, you had a local copy of halotools in your working directory, and so the interpreter looked there, but since that local copy did not have the cython extensions built (or just not self-consistently built), then you got an import error. By moving outside of halotools and trying again, the interpreter moved on down your path sequence until it found the copy of halotools that was installed to your conda directory. This version had the extensions properly built, and so you could import the package without problems.
The upshot is this: once you have installed some package into an environment, typically you should write your code and do the work that uses that package in some location besides the package source code location.
I hope this helps clarify the mysterious error message. Let me know if you encounter any other issues in getting your analysis off the ground.
from halotools.
Related Issues (20)
- masking function issue with subhalo models HOT 3
- Fix bug in Zu&Mandelbaum2016 central occupation function
- Code for wp and tpcf that does weighting and jackknifing? HOT 1
- Zero halo_axisA values in halo catalog HOT 3
- Unexplainable NFW sampling discrepancy HOT 11
- All upid values are -1 when using SubhaloPhaseSpace HOT 1
- installation error with "use_2to3 is invalid" HOT 9
- Subhalo values not being populated in mock when using SubhaloPhaseSpace HOT 2
- pyproject.toml is not properly configured to build HOT 5
- Delete astropy-helpers
- Question on NFWPhaesSpace. HOT 2
- Could not build wheels for halotools, which is required to install pyproject.toml-based projects HOT 2
- Bug in mean_delta_sigma function for non-periodic-box
- Can halotools be installed as root? HOT 1
- Leauthaud11 HOD HOT 13
- Redshifts of galaxies vs halos HOT 1
- Tutorial issues HOT 4
- Compatibility with Python 3.12 HOT 3
- Issue with Importing positional_marked_npairs_3d from halotools.mock_observables.pair_counters HOT 2
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 halotools.