Tag Archives: cmd

[Solved] VSCode Edit LaTeX Error: Recipe terminated with error.

Recipe terminated with error encountered while editing latex in vscode Problem handling method

Question:

After texlive is installed, the command error is displayed in tex – V in the CMD file, but the version information can be displayed normally by opening tex live command line and entering tex – V. This indicates that texlive is installed successfully but the environment variables are configured incorrectly, so the error in the title appears

it is not feasible to add environment variables directly in user variables or system variables;

Solution:

After adding the above text

in the path of the system environment variable, it seems that you don’t need to restart the computer. You can display the information of Tex-V in CMD, and then restart vscode.

[Solved] Import gensim Error: RuntimeError: Cython extensions are unavailable.

Gensim was installed successfully, but a runtimeerror occurred during import
the runtime error is as follows:
runtimeerror: Python extensions are unavailable. Without them, this gensim functionality is disabled. If you’ve installed from a package, ask the package maintainer to include Python extensions. If you’re building gensim from source yourself, run python setup. py build_ Ext — inplace and retry.
after reading other users’ articles, it is found that numpy and SciPy are incompatible with gensim

The solution steps are as follows

    1. view the python adaptation information, download the adapted numpy and SciPy WHL files, install the WHL files, download the gensim again, and run successfully.

First, check the version information of your Python adaptation before downloading the file
Open CMD and directly enter PIP debug -- verbose on the command line. The results are as follows

after finding it, go to the following link to download the adapted numpy and SciPy files

https://www.lfd.uci.edu/ ~gohlke/pythonlibs/

The corresponding downloaded file on my computer is

After downloading, enter CMD
CD to download SciPy and numpy + MKL
Python – M PIP install scipy-1.7.2-cp37-cp37m-win_ amd64.whl
python -m pip install numpy-1.21.4+mkl-cp37-cp37m-win_ amd64.whl

Then uninstall gensim and install gensim
finally, you can import

After Oracle 11g is installed, SQL_ Plus.exe The problem of Chinese garbled in command window

Today, after installing Oracle 11g, we encountered sqlplus.exe Command window user login Chinese garbled problem, hope to give yourself a note, also hope to let more people know how to solve. After entering the CMD, right-click the mouse, click properties, find the box as shown in the figure below, and use the old version of the console!

Push failed Unable to access ‘https://github.com/‘: Failed to connect to github.com port 443: Timed

Remote push error to GitHub warehouse:

Push failed Unable to access ‘ https://github.com/ ‘: Failed to connect to github.com port 443: Timed out

terms of settlement:

Find the GitHub login Certificate in the certificate manager of the control panel and modify the account password.

You can also open it quickly through the CMD window, enter: rundll32.exe keymgr.dll ,KRShowKeyMgr

Kill the specified port CMD command line taskkill in window

Two-step method: 1 query for port occupancy,2 kill the process by force
netstat -aon|findstr “8080”
taskkill /pid 4136-t -f
 
 
Execute the procedure under the Windows command line window
1. Check the specified port usage
netstat aon | findstr searches “8080”
Agreement local address external state of PID

 
The port is occupied by process 4136
2. Directly force kill the specified port
taskkill /pid 4136 -t -f

 
 
Ps: You can also close a process by its program name
View the corresponding process PID
tasklist | findstr searches “127704”
Image name PID will words name session # memory use

Taskkill /f /t /im java.exe

Windows 7 system, start to run input CMD, the window flashed by, disappeared

First of all, my system is Windows 7, this is also suitable for other systems, because my computer is Windows 7 of this problem, so I just in Windows 7, my computer is likely to be used with the first of a virus or Trojan and later killed and incomplete, but kill may have this problem, for example I will use the CMD window to view the IP ah, see ping network speed ah of what, don’t have the CMD feel very uncomfortable, but every time I enter CMD, one black car window is a flash is automatically shut down, no time to lose anything, Through checking the information, fumbled to find a solution, if you also have a similar problem, according to the following methods do not prevent to try.

The CMD command window is used in some special cases, such as PING to see if the network is connected. If you run commands such as Disk Format Conversion in the CMD window, enter CMD Enter and the black box of the CMD command will flash out and disappear, please refer to the following solution.

a, first check the C: \ WINDOWS \ SYSTEM32 of CMD EXE exists, the document date is normal;
test result is normal, same as other system file date, should not be this problem.

br>

%SystemRoot%;
view after found (if there is no need to add)

3, it is not in the above two common problems, should be modified is the registry.
registry:
ey_local_machine \Software\Microsoft\Command Processor\AutoRun
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
registry:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun (There is no numerical value, but a flash may be eXist, it can be cleared.)

, if it still doesn’t work, try using CMD /k, for example “CMD /k ipconfig /all” in the “Run” window.

Through PID (process identification) to find the port (port) occupied applications, to solve the problem of port occupied

Step 1: Query the applied PID value occupying the port (Process Identification Process ID)

Enter the command in the DOS window: netstat -aon|findstr "port number "
to get the PID of the occupied port application, the port number is determined according to its own occupied port number

Step 2: Query the process for the specified PID value

In the DOS window, enter the command: tasklist|findstr "PID value "
to view the specified PID process. The PID value is obtained according to the port number occupied by itself

Step 3: End the process occupying the port

In the DOS window, enter the command: taskkill /T /F /PID PID value
to end the process command, the PID value should be changed to the PID value of the process you want to end

It is also possible to find the corresponding PID value of the process in the task manager manually right-click to end

Install Seaborn, plot, Jieba in Anaconda

Seaborn is a very useful visualization package from Stanford university.
the original anaconda installation does not contain seaborn, which needs to be installed.
specific installation method:
1. From the beginning of your computer, open the CMD command window and type conda install seaborn
or anaconda prompt, conda install seaborn or PIP install seaborn

During the installation, Conda finds the seaborn dependent package based on its dependency, enters Y manually, and when it hits enter, the system automatically downloads and updates them.

Then, in Anaconda’s spider editor, import Seaborn and run without error. Ok, perfect!!
Of course, install plotly in a similar way: open the CMD command window, then type conda install plotly,
install it, and use the conda list to see if it succeeded.
Similarly, to install jieba, you can use either
conda install jieba or PIP install jieba

Python packaged *. Exe is running os.popen (cmd)/ subprocess.Popen *. Exe crashes with invalid [winerror 6] handle

Summary of the problem: last week I used Python3.8.5 to write an upgrade script for a software running on Windows 7, and by printing and exception catching found that the script crashed when the script was executed to os.popen(CMD), the exception was [WinError 6] handle invalid

Part of the test code:

logging.info('__Start__')
logging.info('os.system1')
logging.info('os.popen1')
try:
    logging.info(os.popen('c:'))
    logging.info('os.popen2')
except Exception as a:
    logging.info(a)
    logging.info('os.popen3')
logging.info('os.popen4')

Effect :

After testing, it was found that the program and script could run normally on Win10, and the script was executed separately on Win7 without any problem, and the script was called with the program on Win7, even if the script was executed OS.popen (‘ c: ‘) would crash.

Because os.popen is actually the encapsulation of subprocess.Popen, so the title also carries subprocess.Popen
solution: to implement a function myPopen, or use subproce. popen0 will be 1 stdin = Subprocess. DEVNULL to modify, the code is as follows:

def myPopen(cmd):
    proc = subprocess.Popen(cmd,
                            shell=True,
                            stdout=subprocess.PIPE,
                            stdin=subprocess.DEVNULL)
    return proc.stdout.read().decode()

Python running as Windows Service: OSError: [WinError 6] The handle is invalid
Popen(

Could not find or load main class

It’s a shame that after all this time, Javac hello. Java is normal today when Java is running in CMD, Java hello, Could not find or load main class

public class TestHuman {

public static void main(String[] args) {

system.out.println (” hello Word!!”) );

}

}

can execute javac hello. Java instruction code is ok, when executing Java hello, there is a problem, it should be the environment variable configuration, what is the problem…

After a long search, I found the CLASSPATH {%JAVA_HOME%\lib; %JAVA_HOME%\lib\tools.jar}, preceded by “.;” .
Why is it missing?Does not affect Eclipse but will affect the operation of CMD…
Eclipse will automatically configure packages, projects, and paths for us, so that’s fine,
CMD has to manually configure these paths by itself, adding “. “means the current path, so there is no need to write the path step by step.

And I at the beginning of the configuration, should not understand what the point here is, there is no configuration, almost make a joke, mutual encouragement ~ mutual encouragement ~