Git Product home page Git Product logo

Comments (13)

iceback avatar iceback commented on May 29, 2024 1

from open-cravat.

rkimoakbioinformatics avatar rkimoakbioinformatics commented on May 29, 2024

Hi @iceback , the installation failed while installing pyyaml, due to the lack of Python development package. Which OS are you using? Python 3.6 is used?

from open-cravat.

iceback avatar iceback commented on May 29, 2024

from open-cravat.

kmoad avatar kmoad commented on May 29, 2024

Unless this is a already a way your team commonly installs python packages, you may be better off using python virtual environments. As in,

python3 -m venv /group3/tools/pythonvenv
source /group3/tools/pythonvenv/bin/activate
python3 -m pip install open-cravat

This will ensure that the oc tool is available on the command line, as long as the venv is active.

From some older python docs, the --install-option="--prefix=/group3/tools" option is changing the install write directory, while running python from the system path. Unless you have the relevant directories under /group3/tools added to your PATH, the oc command line tool will not be available. The same issue would still apply if you used the newer --target option for pip as well.

from open-cravat.

iceback avatar iceback commented on May 29, 2024

from open-cravat.

iceback avatar iceback commented on May 29, 2024

If I'm following correctly you removed linux option 2), leaving only the single-user option 1.
The system we're on now has the python-dev pkg so "pip3 install open-cravat" succeeds, including the installation of the rather old Yaml (3.*!?). Yippee

However, I do not see any "oc" (nor "cravat") executable so "oc module install-base" is off the table

In interactive python3 session, "import cravat" get this little scree, twice

  >>>import cravat
/uufs/chpc.utah.edu/common/home/camp-group1/tools/lib/python3.6/site-packages/cravat/constants.py:35: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full d\
etails.
  conf = yaml.load(f)

Is that expected?

from open-cravat.

kmoad avatar kmoad commented on May 29, 2024

That message is expected with pyyaml>=5.1. It will be gone in the next version of OC, and the warning can be disabled by setting an environment variable as described here. PyYaml made some non-backwards compatible changes and was unstable for a few versions around 5.1, so we temporarily pinned to a stable version.

The oc executable is a script that pip automatically creates in the user's path. The script is

#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'open-cravat==1.7.2','console_scripts','oc'
__requires__ = 'open-cravat==1.7.2'
import re
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(
        load_entry_point('open-cravat==1.7.2', 'console_scripts', 'oc')()
    )

Putting this script somewhere in path should make oc work.

from open-cravat.

kmoad avatar kmoad commented on May 29, 2024

Also, depending on how your machine is configured, you may want to put oc's modules directory (where reference data gets installed) somewhere other than the default, which is under python's package directory. This can be done with oc config md [path], before oc module install-base.

from open-cravat.

kmoad avatar kmoad commented on May 29, 2024

@iceback We've just release OpenCRAVAT 1.8.0, which won't throw pyyaml warnings. If you update, be sure to change the version number in the oc script above.

from open-cravat.

iceback avatar iceback commented on May 29, 2024

I'll see if I can recreate the magic
Thanks for the heads-up

from open-cravat.

kmoad avatar kmoad commented on May 29, 2024

Oh, and also, please run oc module update. There are some new modules with 1.8.0 that should speed things up, and take up less disk space.

from open-cravat.

iceback avatar iceback commented on May 29, 2024

Hm - this is tricky:
To hide the yaml warnings I had redirected stderr in a wrapper script. After install of 1.8.0, ocwrapper module update listed four things to update. Then nothing. For a really long time - until I clued in. Not sure I agree with the use of both stdout and stderr in the same breath?
Then a slew of fun of our own making - a nasty permissions thing. Redo the install/update.Then a trial -expect nothing - run of oc module update:
oc module update
Newer versions of (cravat-converter, oldcravat-converter, vcf-converter) are available, but would break dependencies. You may use --strategy=force to force installation.
No module updates are needed

I think we're good, but a little shakey. (I don't use oc, I'll pester she-who-does to try it asap)

from open-cravat.

kmoad avatar kmoad commented on May 29, 2024

Appreciate the detail here. Looks like the "Continue" prompt for oc module update goes to stderr, and was being redirected. Oddly, it appears to get redirected by 1> /dev/null and by 2> /dev/null. Gonna dig a bit to figure out what python's up to there.

from open-cravat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.