pymol installation following PyMOLWIKI instructions getting the error python2.7: can't open file 'setup.pymol': [Errno 2] No such file or directory after trying to compile and installing

Asked by johan-owen de craene

Dear all,

I've followed the pymol installation instructions from PyMOLWIKI. I'm getting the error python2.7: can't open file 'setup.pymol': [Errno 2] No such file or directory after trying to compile and installing. This is the script I used
#!/bin/bash -e

prefix=/opt/pymol-svn
modules=$prefix/modules

# If you want to install as root, then split this line up in "build"
# and "install" and run the "install" with "sudo"
python2.7 setup.py build install \
    --home=$prefix \
    --install-lib=$modules \
    --install-scripts=$prefix

Would any of you have the solution to this problem? Thanks for your help.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of:

lsb_release -a; uname -a; python -V

Thanks

Revision history for this message
johan-owen de craene (seahorse378) said :
#2

It's
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
Linux ST-1602L-YC1290 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Python 2.7.12

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

If you run:

sudo apt-get install pymol

Does it install OK?

Revision history for this message
johan-owen de craene (seahorse378) said :
#4

yes it does.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Then the install is done..... Your question said you couldn't install it. It's in the default Ubuntu repository and I found the instruction on the pymol website

Revision history for this message
johan-owen de craene (seahorse378) said :
#6

So I followed the instructions on this website
https://pymolwiki.org/index.php/Linux_Install

and tried the part entitled

Compile and install

This will install PyMOL as normal user into /opt/pymol-svn. If you don't have write permissions to /opt, change the prefix variable to something like $HOME/pymol-svn.

#!/bin/bash -e

prefix=/opt/pymol-svn
modules=$prefix/modules

# If you want to install as root, then split this line up in "build"
# and "install" and run the "install" with "sudo"
python2.7 setup.py build install \
    --home=$prefix \
    --install-lib=$modules \
    --install-scripts=$prefix

Now launch PyMOL like this:

/opt/pymol-svn/pymol

If I'm not mistaken the # is for remarks not code and this gave me the following error message
  python2.7: can't open file 'setup.py': [Errno 2] No such file or directory
hence I can't launch PyMOL using
/opt/pymol-svn/pymol

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#7

You don't need to compile the install. This has been done for you and is the same reason you didn't compile your Web browser but it's running on your computer right now...

Revision history for this message
johan-owen de craene (seahorse378) said :
#8

It works now. They have made it more confusing than it should be on the website https://pymolwiki.org/index.php/Linux_Install.

thank you for your help.