0

Newbie. I am trying to install BeautifulSoup4. There is a shell script "convert-py3k" to run, to convert to Python 3 version. It has an executable permission but, neither double clicking nor, running it from the command line works. Says file not found. What am I not getting?

I tried it with a sudo and got the same results.

enter image description here

2 Answers 2

3

Running an executable file that exists in the same directory you are in, requires the use of ./ in the beginning of the filename. In this case, the correct sytax to use in the terminal is:
./convert-py3k + Enter

There should be NO spaces between ./ and the filename.

5
  • I'm glad it worked. Please mark the answer as accepted if you like.
    – Stormlord
    May 29, 2016 at 22:12
  • shouldn't it search in the current directory automatically? why do i have to include a path?
    – givonz
    May 29, 2016 at 22:12
  • thought i marked the answer accepted. why doesn't it run from the GUI?
    – givonz
    May 29, 2016 at 22:14
  • 1
    Linux doesn't work that way. If no path is defined, it searches inside the predefined path only. The current folder is not included automatically.
    – Stormlord
    May 29, 2016 at 22:14
  • There's a chance it did run from the gui but since it's not a gui app, its output needs an open terminal window for you to be able to see it. So you need to create a launcher to run the script inside a terminal.
    – Stormlord
    May 29, 2016 at 22:17
0

You have not defined the path variable in any of .profile or .bashrc file.

use ./ at the beginning of the file name without space as described in first answer. Or you can also run your script without ./ and from any directory.

For that, you'll have to add PATH variable in .profile. Best way is to make a directory and keep all your scripts in it and define the path of that directory to PATH variable in your .profile file.

You will be able to run all your scripts in this directory from any other directory and without using ./.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.