0

I am trying to install fpylll from a repository on Ubuntu 18.04 The fpylll instruction in README.rst says that after Automatic install you should do

$ source ./activate

but I get a notification:

/ bin / sh: 1: source: not found

why it happens? I thought the source is in bash by eliciting? How to solve this problem?

4
  • 2
    source is a bash-built-in, not a sh-builtin and you are obviously using sh instead of bash.
    – mook765
    Sep 15 at 20:22
  • @mook765 Help what should I do? What exactly needs to be changed?
    – Dew Debra
    Sep 15 at 20:25
  • I don't know how it comes that you use sh, but you have to use bash. So you could just type bash into your terminal and hit enter, then try to source the file again.
    – mook765
    Sep 15 at 20:31
  • is there a reason why not use sudo apt install python-fpylll
    – bac0n
    Sep 15 at 20:37
1

please replace "source ./activate" with ". ./activate"

see: Bourne shell builtins

good luck.

5
  • After I ran the command: PYTHON = python3 ./bootstrap.sh I get a notification: Installed /content/fpylll/fpylll-env/lib/python3.7/site-packages/fpylll-0.5.6-py3.7-linux-x86_64.egg Processing dependencies for fpylll==0.5.6 Finished processing dependencies for fpylll==0.5.6 Don't forget to activate environment each time:
    – Dew Debra
    Sep 15 at 21:39
  • Then, as you wrote, I ran the command: ./activate As a result, nothing was displayed in the terminal. Then I ran my script and got notifications that the module is missing: Traceback (most recent call last): File "script.py", line 35, in <module> from fpylll import LLL, BKZ, IntegerMatrix ModuleNotFoundError: No module named 'fpylll'
    – Dew Debra
    Sep 15 at 21:44
  • I have Ubuntu 18.04 but the script needs to be run on Python3. From the [documentation] (ubuntu.pkgs.org/21.04/ubuntu-universe-amd64/…), this only works on Ubuntu 21.04. Then I decided to install fpylll via repositories. But don’t know what the problem is?
    – Dew Debra
    Sep 15 at 21:50
  • hi @DewDebra. Activate only sets enviroment variables to point to the Libs and bootstrap.sh is a shell script. Take a look at github.com/fplll/fpylll/blob/master/bootstrap.sh on lines 33-39 and 50-55. Those lines set enviroment variables.
    – jpbrain
    Sep 15 at 22:08
  • So you need to set your enviroment correctly to be able to run it. what do you get with "env" and "env python" commands.
    – jpbrain
    Sep 15 at 22:09

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.