astral-sh / uv

An extremely fast Python package and project manager, written in Rust.
https://docs.astral.sh/uv
Apache License 2.0
20.45k stars 605 forks source link

pynmstar failure to compile sub package #7589

Open varioustoxins opened 2 hours ago

varioustoxins commented 2 hours ago

HI if I do uv tool install nef-pipelines it all appears to work However, when I run the command nef [the main entry point to my application in nef-pipelines], I get

raise ImportError('Could not import cnmrstar sub-module! Your installation appears to be broken.')

This appears to be because the dependant c file from the package pynmstar.cnmrstar doesn't appear to be compiled properly. I appear to have had similar but different problems as the c component seems to require the latest setup tools to compile. So when using pip I have to do

pip install --upgrade wheel setuptools

and sometimes

pip install --upgrade wheel setuptools backports.tarfile

to get the installation to work, this is on a centos 7 system but I have had this problem elsewhere

this is with the latest uv at time of writing 0.4.13

varioustoxins commented 2 hours ago

this is also discussed here, binary wheels are provided so it shouldn't need to build the c

charliermarsh commented 2 hours ago

Can you share the output of uv tool install with --verbose?

varioustoxins commented 2 hours ago

here you go output.txt

charliermarsh commented 1 hour ago

So for one: pynmrstar only ships wheels for Python 3.9 and earlier. You're on Python 3.12, so I think it's correct that it's building from source.

charliermarsh commented 1 hour ago

See here (look at cp39 etc.).

charliermarsh commented 1 hour ago

It seems to install ok for me:

❯ nef
Usage: nef [OPTIONS] COMMAND [ARGS]...

Options:
  --install-completion [bash|zsh|fish|powershell|pwsh]
                                  Install completion for the specified shell.
  --show-completion [bash|zsh|fish|powershell|pwsh]
                                  Show completion for the specified shell, to
                                  copy it or customize the installation.
  --help                          Show this message and exit.

Commands:
  chains     - carry out operations on chains
  csv        - read [rdcs]
  deep       - read deep [peaks]
  echidna    - read echidna data [peaks]
  entry      - carry out operations on the nef file entry
  fasta      - read and write fasta sequences
  fit        - carry out fitting operations [alpha]
  frames     - carry out operations on frames in nef files
  globals    - add global options to the pipeline [use save as your last...
  header     - add a header to the stream
  help       - help on the nef pipelines tools and their usage
  loops      - carry out operations on loops in nef frames
  mars       - read and write mars [shifts and sequences]
  modelfree  - write modelfree [relaxation data]
  nmrpipe    - read nmrpipe [peaks shifts & sequencess]
  nmrstar    - read NMR-STAR [sequences & shifts]
  nmrview    - read and write nmrview [peaks, sequences & shifts]
  pales      - read and write pales/dc [rdcs]
  pdbx       - read pdb [sequences]
  peaks      - carry out operations on nef peaks
  rpf        - write rpf shifts
  save       - save the entries in the stream to a file / files or stdout...
  series     - carry out operations on a data series
  shifts     - carry out operations on shifts [average]
  shiftx2    - read shiftx2 data [shifts]
  shifty     - write shifty [shifts]
  simulate   - simulate data
  sink       - read the current stream and don't write anything
  sparky     - read sparky files [shifts]
  stream     - stream a nef file
  talos      - read and write talos files [shifts & restraints]
  test       - run the test suite
  xcamshift  - write xcamshift for xplor [shifts]
  xeasy      - read xeasy files [flya dialect: sequence]
  xplor      - read xplor [sequences, dihedral & distance restraints]

Do you see a failure when running just nef? Or when you run nef within a project, some specific subcommand, etc.?

varioustoxins commented 35 minutes ago

just running it as a command as you did... it maybe a centos 7 oddity it is quite old, I have tried it on a couple of centos 7 installations, so I assume that its not just a wrinkle on a particular install