Score:1

bin/sh: 1: source: not found

cn flag

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?

mook765 avatar
cn flag
`source` is a bash-built-in, not a sh-builtin and you are obviously using sh instead of bash.
Dew Debra avatar
cn flag
@mook765 Help what should I do? What exactly needs to be changed?
mook765 avatar
cn flag
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.
bac0n avatar
cn flag
is there a reason why not use `sudo apt install python-fpylll`
Score:2
ca flag

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

see: Bourne shell builtins

good luck.

Dew Debra avatar
cn flag
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 avatar
cn flag
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 avatar
cn flag
I have Ubuntu 18.04 but the script needs to be run on Python3. From the [documentation] (https://ubuntu.pkgs.org/21.04/ubuntu-universe-amd64/python3-fpylll_0.5.2+ds1-3_amd64.deb.html), this only works on Ubuntu 21.04. Then I decided to install fpylll via repositories. But don’t know what the problem is?
jpbrain avatar
ca flag
hi @DewDebra. Activate only sets enviroment variables to point to the Libs and bootstrap.sh is a shell script. Take a look at https://github.com/fplll/fpylll/blob/master/bootstrap.sh on lines 33-39 and 50-55. Those lines set enviroment variables.
jpbrain avatar
ca flag
So you need to set your enviroment correctly to be able to run it. what do you get with "env" and "env python" commands.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.