From: Pablo C. <pc...@cn...> - 2021-06-03 12:51:49
|
Hi, ... …/scipion3/.scipion3env/bin/scipion is a "shell compatible" shortcut to scipion3/.scipion3env/lib/python3.6/site-packages/scipion/ (python module). Only when the environement is activated, "scipion3/.scipion3env/bin" is added to the PATH variable, so from then, "scipion" is available as a command in a shell. But without the environment activated that command is missing. Using chmod will not harm, unless you do not trust the users. Anyone could break the installation. We have in our severs installations done with one user (not root, but "admin"), protected to the rest of the users and they are working fine. In theory , to run python code is not needed write permissions. My guess, is that, for some reason, Morgan setup is not able to activate the environment. Morgan, I'd say all is around the content of "scipion3" launcher. This is a file that might look like more or less like this: ___________________________________ #!/usr/bin/env python # Scipion launcher import os import sys from os.path import dirname, abspath, join, basename # Set SCIPION_HOME to the location of this file scipionHome = dirname(abspath(__file__)) os.environ["SCIPION_TESTS_CMD"] = basename(__file__) + " tests" os.environ["LD_LIBRARY_PATH"] = ":".join([os.environ.get("LD_LIBRARY_PATH", ""), join(scipionHome, "software", "lib")]) os.environ["PYTHONPATH"] = ":".join([os.environ.get("PYTHONPATH", ""), join(scipionHome, "software", "bindings")]) cmd = "" if len(sys.argv) > 1 and sys.argv[1] == 'git': for repo in ['scipion-app', 'scipion-pyworkflow', 'scipion-em']: cmd += ("(cd "+join(scipionHome, repo)+" ; echo ' > in "+repo+":' ;" " git "+' '.join(sys.argv[2:])+" ; echo) ; ") else: # Activate the environment cmd = '. /home/pablo/software/scipion/.scipion3/bin/activate && ' cmd += "python -m scipion %s" % " ".join(sys.argv[1:]) # Set SCIPION_HOME os.environ["SCIPION_HOME"] = scipionHome _____________________________________ You can try the equivalent to my: . /home/pablo/software/scipion/.scipion3/bin/activate This is meant to source and activate the environment, and maybe from another user it does not work What happens if you do this? . /usr/local/bin/scipion3/.scipion3/bin/activate which python On 3/6/21 11:21, Teige Matthews-Palmer wrote: > Soz for spam - think I’m wrong to say > …/scipion3/.scipion3env/bin/scipion is the module, I think it’s rather > in scipion3/.scipion3env/lib/python3.6/site-packages/scipion/ > I guess that if users are denied permission to any of this, then it > will fail to load the module. > > Open question: is it OK generally to do chmod -R 755 to the whole > scipion directory - and maybe it solves the problem Morgan has? > >> On 3 Jun 2021, at 18:14, Teige Matthews-Palmer <tei...@gm... >> <mailto:tei...@gm...>> wrote: >> >> That sounds probably right! On my install the module called scipion >> is found in …/scipion3/.scipion3env/bin/scipion , it and everything >> alongside it are owned by root and 755 permission and it works fine >> (I think it’s a venv install - at least I know I wanted to avoid >> miniconda). >> >> Good luck >> Teige >> >>> On 3 Jun 2021, at 17:54, Grigory Sharov <sha...@gm... >>> <mailto:sha...@gm...>> wrote: >>> >>> I think you should have a folder >>> /usr/local/bin/scipion3/.venv/scipion3 where the venv is located.. >>> >>> Best regards, >>> Grigory >>> >>> -------------------------------------------------------------------------------- >>> Grigory Sharov, Ph.D. >>> >>> MRC Laboratory of Molecular Biology, >>> Francis Crick Avenue, >>> Cambridge Biomedical Campus, >>> Cambridge CB2 0QH, UK. >>> tel. +44 (0) 1223 267228 <tel:+44%201223%20267228> >>> e-mail: gs...@mr... <mailto:gs...@mr...> >>> >>> >>> On Thu, Jun 3, 2021 at 9:52 AM Teige Matthews-Palmer >>> <tei...@gm... <mailto:tei...@gm...>> wrote: >>> >>> Hi Morgan, >>> >>> I installed scipion3 and its packages a while ago and remember >>> it was a bit tricky/fussy on Centos7 too. >>> >>> Just some ideas, it seems like user’s python is not searching >>> the directory where the scipion module is, or permissions stop >>> it from finding the module? >>> >>> The scipion launcher /usr/local/scipion3/scipion3 starts with >>> the shebang #!/usr/bin/env python3, which should invoke the >>> default python3 of the user’s environment. I don’t think this >>> would be the issue, but maybe user has a different default >>> python binary? >>> >>> Or, you could use /python -c ‘import sys; print(sys.path)’/ to >>> print out the directories where python will search for modules. >>> Is it different between root and user? >>> For me, it includes …/python3.8/site-packages , which contains >>> scipioninstaller, and I think that eventually leads to it >>> finding scipion3. I can’t tell exactly where the module referred >>> to as “scipion” is located, but specifying its directory in >>> PYTHONPATH could solve it? >>> >>> Otherwise, potentially the directory where the scipion module is >>> found has permissions that deny user access, and need chmod? >>> >>> Hope it doesn’t take too many more knots before it’s working! >>> Teige >>> >>> >>>> On 2 Jun 2021, at 22:50, Morgan Beeby <m....@im... >>>> <mailto:m....@im...>> wrote: >>>> >>>> Dear all, >>>> >>>> I wondered if anyone could help point me in the direction of >>>> installing scipion3 for all users on a machine (ultimately for >>>> cluster install for all users)? I seem to be tying myself in >>>> knots with what seems to be a trivial install. >>>> >>>> As root, I am doing the following to install on Linux Mint 20 >>>> (after insuring all prequisite libraries are installed): >>>> >>>> * >>>> pip install scipion-installer >>>> * >>>> python -m scipioninstaller /usr/local/bin/scipion3 -venv -j 4 >>>> >>>> Then as user: >>>> >>>> * alias scipion3=/usr/local/bin/scipion3/scipion3 >>>> * scipion3 >>>> >>>> But I get an error: >>>> >>>> * /usr/bin/python: No module named scipion >>>> >>>> (it runs ok for root) >>>> >>>> It seems like this should just work, but after hours of playing >>>> around, I've had no success, and I cannot find anything on >>>> multiuser installs on linux. >>>> >>>> thanks, >>>> >>>> Morgan >>>> >>>> >>>> -- >>>> Dr Morgan Beeby >>>> Department of Life Sciences >>>> c/o Department of Chemistry Stores >>>> Imperial College London >>>> Frankland Road >>>> London, SW7 2AZ >>>> United Kingdom >>>> >>>> Office: +44 (0)20 7594 5251 >>>> Web : www.beebylab.org >>>> >>>> ~ ~ ~ >>>> >>>> Schedule a meeting with me: https://go.oncehub.com/MorganBeeby >>>> <https://go.oncehub.com/MorganBeeby> >>>> >>>> ~ ~ ~ >>>> >>>> Drop in office hours, no appointment necessary, over the next 7 >>>> days: >>>> >>>> (Teams link >>>> <https://teams.microsoft.com/l/meetup-join/19%3ameeting_NzA4MjI4OGItZmYwOC00Yjk5LThkMzQtNmU1MGI1YjJkYTZh%40thread.v2/0?context=%7b%22Tid%22%3a%222b897507-ee8c-4575-830b-4f8267c3d307%22%2c%22Oid%22%3a%22ecb94a12-de34-4549-a7a5-083198e59504%22%7d>) >>>> 12:30pm - 1:00pm (Europe/London), Wednesday 02 Jun >>>> (Teams link >>>> <https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTExZWZhZjctYjdhNC00YmZmLTg3MmUtYzc5NjE1NDkzNWI2%40thread.v2/0?context=%7b%22Tid%22%3a%222b897507-ee8c-4575-830b-4f8267c3d307%22%2c%22Oid%22%3a%22ecb94a12-de34-4549-a7a5-083198e59504%22%7d>) >>>> 1:15pm - 1:45pm (Europe/London), Monday 07 Jun >>>> (Teams link >>>> <https://teams.microsoft.com/l/meetup-join/19%3ameeting_NWZlNGZmYzMtMWJjZS00M2Q4LWFhNGQtNTdlYmE2YTFmZjc4%40thread.v2/0?context=%7b%22Tid%22%3a%222b897507-ee8c-4575-830b-4f8267c3d307%22%2c%22Oid%22%3a%22ecb94a12-de34-4549-a7a5-083198e59504%22%7d>) >>>> 1:15pm - 1:45pm (Europe/London), Tuesday 08 Jun >>>> >>>> Full schedule and links: http://www.beebylab.org/contact/ >>>> <http://www.beebylab.org/contact/> >>>> _______________________________________________ >>>> scipion-users mailing list >>>> sci...@li... >>>> <mailto:sci...@li...> >>>> https://lists.sourceforge.net/lists/listinfo/scipion-users >>>> <https://lists.sourceforge.net/lists/listinfo/scipion-users> >>> >>> _______________________________________________ >>> scipion-users mailing list >>> sci...@li... >>> <mailto:sci...@li...> >>> https://lists.sourceforge.net/lists/listinfo/scipion-users >>> <https://lists.sourceforge.net/lists/listinfo/scipion-users> >>> >>> _______________________________________________ >>> scipion-users mailing list >>> sci...@li... >>> <mailto:sci...@li...> >>> https://lists.sourceforge.net/lists/listinfo/scipion-users >>> <https://lists.sourceforge.net/lists/listinfo/scipion-users> >> > > > > _______________________________________________ > scipion-users mailing list > sci...@li... > https://lists.sourceforge.net/lists/listinfo/scipion-users -- Pablo Conesa - *Madrid Scipion <http://scipion.i2pc.es> team* |