Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install TARDIS with pip #1211

Closed
epassaro opened this issue Jun 29, 2020 · 6 comments · Fixed by #1686
Closed

Can't install TARDIS with pip #1211

epassaro opened this issue Jun 29, 2020 · 6 comments · Fixed by #1686

Comments

@epassaro
Copy link
Member

epassaro commented Jun 29, 2020

Description

pip install git+https://github.com/tardis-sn/tardis

... does not work anymore!.

ModuleNotFoundError: No module named 'pyne'

Please, try to reproduce this bug in a fresh environment with latest TARDIS release and fix.

@arjunsavel
Copy link
Contributor

Reproduced this while installing on Moria!

@epassaro
Copy link
Member Author

Bug introduced in 3297d26

@jaladh-singhal
Copy link
Member

Bug introduced in 3297d26

@epassaro In theory, this shouldn't happen - we can hunt down the cause if you want on next Wednesday?

@nvieira-mcgill
Copy link

Hi,

I recently encountered this issue with pyne when attempting to use TARDIS on a remote server where use of conda was prohibited. I was actually able to solve it, but the method was fairly convoluted... posting it here anyways for others who have this problem.

I had to download the package conda-press (https://github.com/regro/conda-press), which allows you to turn conda packages into wheels which can then be installed via pip. I used conda-press on the file linux-64/pyne-0.5.11-py36_blas_openblas_0.tar.bz2, which I downloaded manually from conda-forge (https://anaconda.org/conda-forge/pyne/files). Specifically, to build a wheel from the conda file, the command was:

conda press pyne-0.5.11-py36_blas_openblas_0.tar.bz2

Which produced a wheel file pyne-0.5.11-0_py36_blas_openblas-cp36*-cp36*m-linux_x86_64.whl. I then uploaded this file to my remote server. On this server, I activated the environment of interest, and was able to build pyne. In generalized code:

source /home/me/my-environment/bin/activate
module load python/3.6
mkdir target-pyne-36
pip install --python-version 36 -V --no-deps --target target-pyne-36/ pyne-0.5.11-0_py36_blas_openblas-cp36\*-cp36\*m-linux_x86_64.wh

I then had to manually copy over the contents of the directory target-pyne-36 to the directory /home/me/my-environment/lib/python3.6/site-packages, and finally, pip was able to locate the package pyne-0.5.11. I was then able to build TARDIS by installing the latest version from the github and running the setup.py script.

Note that I contacted the pyne devs about upgrading the version of pyne available on PyPI from 0.1.0 to 0.5.11, as I believe this would solve this issue. I spoke to them in early June and they were optimistic about being able to do this at some point.

@jaladh-singhal
Copy link
Member

I too encountered this error, but for me it's No Module named Cython

Full error log:

ERROR: Command errored out with exit status 1:
   command: /home/jals/miniconda3/envs/tardis/bin/python3.7 /home/jals/miniconda3/envs/tardis/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp8mtnu1lx
       cwd: /tmp/pip-req-build-x8iys0no
  Complete output (40 lines):
  warning: no previously-included files found matching '*.pyc'
  warning: no previously-included files found matching '*.o'
  no previously-included directories found matching 'build'
  no previously-included directories found matching 'astropy_helpers/tests'
  Traceback (most recent call last):
    File "/home/jals/miniconda3/envs/tardis/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
      main()
    File "/home/jals/miniconda3/envs/tardis/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/jals/miniconda3/envs/tardis/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 114, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/pip-build-env-nhgnsjga/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 150, in get_requires_for_build_wheel
      config_settings, requirements=['wheel'])
    File "/tmp/pip-build-env-nhgnsjga/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 130, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-nhgnsjga/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 254, in run_setup
      self).run_setup(setup_script=setup_script)
    File "/tmp/pip-build-env-nhgnsjga/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 145, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 83, in <module>
      cmdclassd = register_commands(PACKAGENAME, VERSION, RELEASE)
    File "/tmp/pip-req-build-x8iys0no/astropy_helpers/astropy_helpers/setup_helpers.py", line 181, in register_commands
      add_command_hooks(registered_commands, srcdir=srcdir)
    File "/tmp/pip-req-build-x8iys0no/astropy_helpers/astropy_helpers/setup_helpers.py", line 214, in add_command_hooks
      for setuppkg in iter_setup_packages(srcdir, packages):
    File "/tmp/pip-req-build-x8iys0no/astropy_helpers/astropy_helpers/setup_helpers.py", line 439, in iter_setup_packages
      name=packagename + '.setup_package')
    File "/tmp/pip-req-build-x8iys0no/astropy_helpers/astropy_helpers/utils.py", line 225, in import_file
      mod = loader.load_module()
    File "<frozen importlib._bootstrap_external>", line 407, in _check_name_wrapper
    File "<frozen importlib._bootstrap_external>", line 907, in load_module
    File "<frozen importlib._bootstrap_external>", line 732, in load_module
    File "<frozen importlib._bootstrap>", line 265, in _load_module_shim
    File "<frozen importlib._bootstrap>", line 696, in _load
    File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 728, in exec_module
    File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    File "tardis/montecarlo/setup_package.py", line 5, in <module>
      from Cython.Build import cythonize
  ModuleNotFoundError: No module named 'Cython'

This is strange though, because in a python kernel with tardis environment, I can easily from Cython.Build import cythonize works fine!

@epassaro
Copy link
Member Author

epassaro commented Jul 2, 2021

Closed by #1686

@epassaro epassaro closed this as completed Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants