1.Install package “py2app”.
1 | pip install py2app |
2.Package the python’s program into ‘setup.py’
1 | py2applet --make-setup xxx.py |
3.Encapsulate the ’setup.py‘ into an app
1 | python setup.py py2app -A |
1 | pip install py2app |
1 | py2applet --make-setup xxx.py |
1 | python setup.py py2app -A |
1 | # improt package |
1 | curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash |
1 | #Failed to connect to raw.githubusercontent.com port 443 |
Reason: Due to some factors, GitHub’s domain name resolution was polluted.
Solution: modify the host file, the command is as follows
1 | sudo vim /etc/hosts |
1 | 199.232.96.133 raw.githubusercontent.com |
Entering the following commands If you still have problems.
1 | nvm --version |
If prompted “nvm command not found”.
Solve the problem of “nvm command not found”.
Enter the “.nvm” folder,create a new file “.bash_profile”.
1 | touch .bash_profile //create a new file |
1 | vim .bash_profile //open file |
Enter the following
1 | export NVM_DIR="$HOME/.nvm" |
Then close the file and execute the file, terminal input:
1 | source .bash_profile |
terminal input::
1 | nvm --version //The version number appears to indicate a successful installation |
This is an easy way to install MongoDB in the system, you only need to enter a command.
First, make sure your package is up to date. Open the terminal and enter:
1 | sudo apt update && sudo apt upgrade -y |
Continue to install MongoDB:
1 | sudo apt install mongodb |
That’s it! MongoDB is now installed on your computer.
The MongoDB service should be started automatically during installation, but check the service status:
1 | sudo systemctl status mongodb |
Check if the MongoDB service is running.
Run MongoDB
MongoDB is currently a systemd service, so we use systemctl to check and modify its status, using the following command:
1 | sudo systemctl status mongodb |
You can also modify whether MongoDB automatically starts with the system (default: enabled):
1 | sudo systemctl disable mongodb |
To start using (creating and editing) the database, please enter:
1 | mongo |
This will start the mongo shell. For detailed information on queries and options, please check the manual.
Note: Depending on how you plan to use MongoDB, you may need to adjust the firewall. But this is beyond the content of this article, and depends on your configuration.
Uninstall MongoDB
If you install MongoDB from the Ubuntu repository and want to uninstall it (you may have to install it in an officially supported way), please enter:
1 | sudo systemctl stop mongodb |
This should uninstall MongoDB completely. Make sure to back up any collections or documents you might want to keep, as they will be deleted!
As is vividly portrayed painting, in the first picture, there exist a man reading the book. In the second picture, there exist a man sitting the chair front of the bookshelf. The water is to fish what book is to human, which aroused heated discussion among the public.
The painting, evidently, symbolically unveil a widely-recongnized fact that nothing is significant than knowledge in people daily life and social development. Why does reading the book recevied such high emphasis? People ought to attach the importance to knowledge. The factors prove mixed. First and more, in the society level, country will have wider platform and win more influence on global state. Further more, in the individual level ,It can help individual realized their personal value and enjoy high sense of achievement. Which gives them impetus in their professional career. Finally, everyone who stand a better chance to turn crisis to opportunities forge ahead constantly when confront with a great challenge.
In short, in the views of every aspect of this issues, we should bear in mind that reading books is of great significance to both ourselves and society. It is advisable for us to reading books of widely than before.
题目:海滩上有一堆桃子,五只猴子来分。
第一只猴子把这堆桃子凭据分为五份,多了一个,这只猴子把多的一个扔入海中,
拿走了一份。第二只猴子把剩下的桃子又平均分成五份,又多了一个,
它同样把多的一个扔入海中,拿走了一份,第三、第四、第五只猴子都是这样做的,问海滩上原来最少有多少个桃子?