How could I delete nuitka logs? - nuitka

I was using what was nuitka to compile my Python codes, the problem is the annoying (logs / warning) that shows, I have tried with everything but nothing works, I would like to know how to solve this. Any ideas?
Extra: it is not worth using the typical 2>&1, 2>/dev/null, >nul
os.system("nuitka {} -o {} --output-dir={} --quiet --remove-output".format(...))
Github of nuitka

Related

Name error and syntax error when trying to activate jupyterthemes

I am new to Python and Jupyter Notebook (with Anaconda), so bear with me if the answer to this is obvious.
I would like to change my Jupyter Notebook to dark mode. There are a lot of tutorials out there to do so with jupyter-themes, e.g. here. They are straight forward, and all say exactly the same thing, but it simply does not work for me.
When I'm in Jupyter Notebook, installing the themes either with
conda install -c conda-forge jupyterthemes or
pip install jupyterthemes seem to work just fine. However, the following commands will give me the following errors.
jt -l will return
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Input In [5], in <cell line: 1>()
----> 1 jt -h
NameError: name 'jt' is not defined
and
jt -t chesterish will give
Input In [89]
jt -t chesterish
^
SyntaxError: invalid syntax
Same story for any other theme. Any idea what I'm doing wrong? Should I enter the code somewhere else that I'm not aware of?
Either way, thanks in advance and cheers!
If you're in the notebook, try adding an exclamation point before any jt call: !jt -l.
If you change the theme like !jt -t chesterish you'll have to restart jupyter notebook for the change to take place, though. Otherwise, you should be able to do the command without the exclamation point in the anaconda prompt. Hopefully this works! Cheers.

How can I build FreeBSD from source correctly?

I am trying to build FreeBSD from source to see how it works. I googled how to do it, and most of the websites explaining how to build the world tell me to run this command inside the directory of the source code:
sudo make -j1 buildworld KERNCONF=MODEDKERNEL -DNO_CLEAN
For some reason, I keep getting this error...
make: invalid option -- 'D'
make: invalid option -- 'N'
Anyone know how to fix this? The Makefile can be found here
We don't need to see the makefile, because this error is being printed by make due to an invalid command line argument which means it's never even opening the makefile before it fails.
The reason is that -D, etc. are not valid command line options to GNU make. If you run man make (or look online for the GNU make manual) you'll see that -D is not listed as a valid option.
My suspicion is that when the websites you are reading are suggesting that you run make, they mean you should run FreeBSD make, which does support a -D option: https://www.freebsd.org/cgi/man.cgi?make(1)
You are trying to run this using GNU make, which does not have that option.

How to fix asdf error when using buildapp on a quicklisp project

I've been making my first quicklisp project lately and I wanted to share it. I've put it on github, but not everyone has emacs + slime + quicklisp installed so I wanted to make an executable I could put with the code.
To do this I'm using buildapp and following the steps laid out in this stackoverflow answer.
$ sbcl --no-userinit --no-sysinit --non-interactive \
--load ~/quicklisp/setup.lisp \
--eval '(ql:quickload "ltk-colorpicker")' \
--eval '(ql:write-asdf-manifest-file "quicklisp-manifest.txt")'
$ buildapp --output out \
--manifest-file quicklisp-manifest.txt \
--load-system ltk-colorpicker \
--entry colorpicker
After running those commands I get the following error:
Fatal INPUT-ERROR-IN-LOAD:
READ error during LOAD:
The symbol "*SYSTEM-DEFINITION-SEARCH-FUNCTIONS*" is not external in the ASDF/FIND-SYSTEM package.
Line: 16, Column: 90, File-Position: 15267
Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /home/nathan/quicklisp/local-projects/ltk-colorpicker/dumper-2SKVI5f7.lisp" {1001B70F83}>
The main problem here is that I don't even have a clue at how to begin to fix it. I've seen this gibhub issue, but that had to do with problems with Homebrew and it never even mentions buildapp. It's all very confusing. And I hope I could get some help.
Thanks in advance for any answers.
I can reproduce the error. As suggested in the comments, you can build an up-to-date version of buildapp as follows:
$ sbcl
* (ql:quickload :buildapp)
...
* (buildapp:build-buildapp
(merge-pathnames "bin/buildapp" (user-homedir-pathname)))
This build $HOME/bin/buildapp. When I use the new binary, there is no error anymore.
You can also avoid generating an executable (that can end up being outdated) by systematically calling the buildapp::main function from Common Lisp; you will then always have the version that corresponds to the current release of quicklisp:
* (buildapp::main
'("BUILDAPP" ;; argv[0] must exist but the value is not important
"--manifest-file" "/tmp/quicklisp-manifest.txt"
"--load-system" "drakma" "--output" "/tmp/test"))
Some extra info from my point:
The solution was to use the newest version of buildapp as #coredump mentioned. I updated by going to the github page, downloading the zip and doing the following commands at the point where buildapp is stored.
$ make
$ cp buildapp /usr/bin
(This of course only works on linux.)
This is not an elegant solution but buildapp hasn't updated in 4 years, I think it's a safe enough bet. I also made a mistake with the command. The --entry part is wrong. It should have been: `--entry ltk-colorpicker::main`` where main is a function that takes one variable since that's required by the spec.
Main is just this: (main (i) (declare (ignore i)) (colorpicker))

curl error when calling rsconnect::setAccount

I just got a new computer and for some reason this is happening to me when I try to run the rsconnect command in my window. Has anyone else have the same problem.
this is almost certainly caused by compiling curl/libcurl with ./configure --without-ssl
re-compile curl and make sure to run ./configure with --with-ssl, and this error should go away.
(read more on how to compile curl/libcurl here: https://curl.haxx.se/docs/install.html )

How to regenerate configure file using autoconf?

I use autoconf to regenerate the configure file, it works. But when I execute the generated configure file by ./configure, there are some error messages like
./configure: line 3713: syntax error near unexpected token `blas'
./configure: line 3713: ` withval=$with_blas; R_ARG_USE(blas)'
I googled and found that blas is a library, but it still gives the error messages after installing. I have the autoconf with version "autoconf (GNU Autoconf) 2.69" installed on my Mac, and what I am trying to compile is the R source https://svn.r-project.org/R/.
I have run both autoconf -f and autoreconf -f to try to regenerate configure file which has been generated successfully. But, when I run ./configure the error happens again.
The error messages say syntax error near unexpected token blas and withval=$with_blas; R_ARG_USE(blas). I think the problem maybe the unknown function R_ARG_USE. I grep R_ARG_USE in the code base and find that it is defined in the file m4/R.m4:
AC_DEFUN([R_ARG_USE],
[if test "${withval}" = no; then
use_$1=no
else
use_$1=yes
fi
])# R_ARG_USE
Does that mean when I am running autoconf or autoreconf I miss something to let it know the existence of m4/R.m4 ?
I have been stuck here for almost three days, any helps will be appreciated. Thanks a lot.
It seems I have solved this problem. I reinstall the gnu m4 using brew install m4 and the problem solved.
After running autoreconf -i -f, I can get the correct configure file and the R source can be compiled.
Maybe it's the wrong version m4 I have got in Mac.

Resources