current position:Home>Ubuntu has Python libraries installed and cannot run command not found from the command line
Ubuntu has Python libraries installed and cannot run command not found from the command line
2022-07-25 10:30:20【Haulyn5】
Solution
For example, the library is installed runlike , But enter the command directly and prompt after entering Command not found, Refer to the following solutions .( take runlike Replace with the name of the library you installed )
programme 1:
If you only need to execute once , In a hurry, you can use this one-time solution . Add ~/.local/bin, Use absolute path . Examples of the original command and the modified corresponding command are as follows .
#runlike Using the command directly will prompt command not found, Add the previous path according to the following command to successfully execute
~/.local/bin/runlike
programme 2:
Once and for all , Direct will ~/.local/bin/ Path join PATH, In this way, it will be retrieved in this path when executing relevant commands .
export PATH="$HOME/.local/bin:$PATH"
background
Need to use recently docker, Long ago run The container of , Want to run A similar , Then I found it runlike library , Requirements can be fulfilled .runlike It's a python The library of , But the execution is directly in bash Internal input runlike Executive . However, the actual operation encountered Command not found.
At first, it was speculated that python2 and python3 Problems with multiple versions , But in fact, it's not . The general reason is linux Next , Executable scripts are put into ~/.local/bin This directory . However, this directory has not been added PATH, So lead to bash The program couldn't find runlike. Students who are not familiar with script programming can add PATH Relevant knowledge .
Maybe the wrong roast :Python2 Total abandonment ,Python3 Many versions stop supporting 2022 year ,Ubuntu Use pip and python And mark python3 perhaps pip3, tired .
Roast again : What does the quality of the new article suggest ……It looks like it discriminates against blogs with less than 1000 words.
Reference material
copyright notice
author[Haulyn5],Please bring the original link to reprint, thank you.
https://en.pythonmana.com/2022/206/202207250923444517.html
The sidebar is recommended
- 014 Python data structure and algorithm: stack and queue
- 018 Python data structure and algorithm: merge sort / binary search
- Column diagram 5 of Python drawing learning
- Python drawing learning column chart 6
- Python drawing learning column chart 7
- Seaborn of Python drawing histogram
- Seaborn of Python's box drawing
- Seaborn of Python drawing scattergram
- Seaborn of Python drawing violin
- Seaborn of Python drawing kernel density estimation graph
guess what you like
Python drawing heat map Seaborn
Pairplot function in Python visual exploration of the relationship between data features Seaborn
Seaborn of Python drawing column graph
Python draw Wayne diagram
Seaborn of Python line drawing
How to judge whether an element exists in selenium in Python syntax?
[Python PIP special usage] PIP install -v -e. command details
[artificial intelligence] machine learning and intelligent data processing Python uses naive Bayesian algorithm to classify spam message data sets
Django4.0 + web + MySQL 5.7 realize simple login operation
[Python] modules and packages
Random recommended
- Xiao Li: "is there a particularly simple case of Python decrypting RSA?" "Really."
- Create a visual GUI interface with Python, and realize various styles of photo processing with one click
- Mecol Studio - the sixth training of Django
- Simple usage of Python @
- Python of__ doc__
- How to use Python to batch import all data in Excel tables into SQL server specified tables?
- Install python3.8 for Ubuntu
- Python string depth summary
- Goodbye datetime! This Python date library is amazing!
- Python image processing -- three operation modes to realize image morphological transformation
- About the problem that the front-end video tag video cannot drag the progress bar fast forward (Django)
- Sequence data structures commonly used in Python
- On the drawing toolkit in Python
- Pandas - create data structures and basic attributes, sorting
- The use and difference of Python apply (), applymap (), map ()
- Pandas - detailed usage of groupby(), append, insert
- Python interacts with MySQL
- Processes in Python
- Threads in Python
- Summary of dictionary method of Python I
- Python split() function!
- Python programming problem -- how to find the full arrangement of a group of numbers
- Talk about several input methods of Python!
- Automatic classification of Python files (no longer worry about missing files)
- String (Python)
- 15 useful Python libraries in Data Science
- [untitled] Python -- common code 1 for file processing (make file processing easy!)
- Use MATLAB, C, python to write programs, judge and output all primes between M and N!
- Use Python to draw plant leaves from the perspective of probability!
- Anaconda configuration environment that you must learn to get started with python (with pictures and steps)
- Python inputs a number and finds all its prime factors
- Python calculates the length of the last word of a string separated by spaces. The length of the string is less than 5000
- Python completes n[str] decompression
- Random numbers of Python Programming Problems
- The children of two classes in Python got mixed up when they lined up. Each child knew whether he was in the same class with the previous child, and found out the children in the same class
- Python separates strings by length, and if not enough, 0 is added
- Python converts hexadecimal to hexadecimal, and hexadecimal to hexadecimal.
- Python2 realizes string flipping
- Python2 realizes sentence reverse order
- Python realizes the number, according to the reverse order of the input order, and removes duplicates