Tag Archives: Environmental problems

Python environment error, bad interpreter: there is no file or directory

[xxxx@gs-server-7214 ~]$ /opt/anaconda3/bin/jupyter notebook
-bash: /opt/anaconda3/bin/jupyter: /opt/anaconda3/bin/python: Bad interpreter: No that file or directory
[xxxx@gs-server-7214 ~]$ /opt/anaconda3/bin/python3
Python 3.6.10 |Anaconda, Inc.| (default, May  8 2020, 02:54:21)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
[1]+  Stop               /opt/anaconda3/bin/python3

    1. create a soft connection
    1. Jupiter has been installed through

/opt/anaconda3/bin/python3 - M PIP install Jupiter

    1. , and python can also be started under the full path, but the error is reported as above when starting Jupiter under the full path. The reason is that the default interpreter path of anaconda is/opt/anaconda3/bin/python, but there is no such file, Create a soft connection Python to point to the actual interpreter Python 3.6, as follows

- & gt</ Code> indicates soft connection </ OL>

[xxxx@gs-server-7214 bin]$ ll |grep python
-rwxrwxr-x 1 root root      237 10月 24 2019 ipython
-rwxrwxr-x 1 root root      237 10月 24 2019 ipython3
lrwxrwxrwx 1 root root        9 7月  16 16:31 python -> python3.6
lrwxrwxrwx 1 root root        9 8月  28 2020 python3 -> python3.6
-rwxrwxr-x 1 root root 11947112 5月   8 2020 python3.6
lrwxrwxrwx 1 root root       17 8月  28 2020 python3.6-config -> python3.6m-config
lrwxrwxrwx 1 root root        9 8月  28 2020 python3.6m -> python3.6
-rwxrwxr-x 1 root root     3477 8月  28 2020 python3.6m-config
lrwxrwxrwx 1 root root       17 8月  28 2020 python3-config -> python3.6m-config

2. Set the environment variable
and modify the . Bash in your user directory_ Profile file, add environment variable, export path =/opt/anaconda3/bin: $path , colon is separatorsource .bash_ Profile makes the environment variable effective, so you can start jupyter by directly entering jupyter notebook in your user directory.

Resolve – bash: fork: Retail: resource temporarily unavailable error

1. If -bash: fork: retry: Resource error is unavailable, then you have no further questions. If the maximum number of Linux processes is exceeded, then change the maximum number of Linux processes.

Connect to the server using the CRT connection tool

[support@localhost ~]$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 127405
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1024
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
[support@localhost ~]$ 

You can’t switch root after logging in, even if you type the clear command, you will get an error.
online said it could open too many processes, the system allows you to create the maximum number of processes Max user the processes the parameters.
> Max user processes can use ulimit-u 4096, but only in the session of the current terminal. The default values will be used once you log in again. So it can’t be used.
the right way to change is to modify the/etc/security/limits. D/90 – nproc. The values in the conf file. CD/etc/securit/lims.d/
: : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :

# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.

*          soft    nproc     4096
root       soft    nproc     unlimited

You can change the value, but note that root is used for the change, and no other user has permission by default.
because they have no root, he found a can be resource-intensive process, users can connect.
On the Internet to see the number of connections command
ps – the eLf | grep username, check the progress of the target user.
Reference links: http://www.nginx.cn/3002.html
https://zhidao.baidu.com/question/1640745287732090500.html