Tag Archives: windows

A solution to the kernel error of Jupiter notebook in Anaconda under Windows 10

Problem Description:

                After installing Anaconda 3, open the Jupiter notebook to create a new one. When you click Python 3, the kernel error is always displayed. It has been tried several times. I believe many people have such a problem. No matter uninstalling and reloading Anaconda or rebuilding an environment, it has not been solved. Until later, it was found that the nuclear was not cleaned up. Here I share a solution to this problem. Successfully solved my problem.

solve:

1. Open the anaconda prompt window and enter Jupiter kernelspec list to see the location of the current kernel. Note that this is the wrong kernel,

 

2. Copy this address and uninstall the current anaconda

3. Find the address just now and delete the jupyter folder

4. Reinstall Anaconda

It can be solved!!

 

 

SyntaxError: (unicode error) ‘unicodeescape‘ codec can‘t decode bytes in position 2-3: truncated \UX

Open a named PI with absolute path under windows_ The file of digits.txt has an error

Because the resource of the path cannot be found after escape.

To change a \ in the absolute path to\\  

This is the path before the error is reported.

The path that runs successfully after modification.

  Moreover, it can be found that it is not necessary to replace all \ \, replace the front with \ \, and run without changing the back.

SyntaxError: (unicode error) ‘unicodeescape‘ codec can‘t decode bytes in position 2-3: truncated \UX

Error:

When specifying the file path with Python, the error ‘syntax error: (Unicode error)’ Unicode escape ‘codec can’t decode bytes in position 2-3: truncated \ uxxxxxxxx escape’ may occur.

The reason for the error is that “\” is used in a string such as a path, which is treated as an escape sequence. In the windows environment, the combination of ‘\’ and characters represents an escape sequence. Python provides escape sequences including \\(backslash) and \n (line spacing).

Generally speaking, the path is as follows:

C:\Users\Desktop\myproject

 

Solution:

Windows:

Use the escape sequence “\\” representing the backslash (on windows\), as follows:

C:\\Users\\Desktop\\myproject

Unix:

Use “/” to separate directories

C:/Users/Desktop/myproject

How to Solve QT error: LNK1158: Cannot Run “rc.exe”

[problem description]

Qt5.9.11 is installed on windows10, and the compilation error is: error: lnk1158: unable to run “RC. Exe”

[problem location]

The path of rc.exe is not put into the environment variable

[solution]

Add the path “C:\program files (x86)\windows kits\8.1\bin\x86” to the environment variable path.

Restart qtcreator and the compilation is successful.

cURL error 60: SSL certificate problem: self signed certificate in certificate chain

1、 Question

Curl error 60: SSL certificate problem: self signed certificate in certificate chain – server http302 this is generally a problem with self signed certificates

2、 Settle

Scheme 1. Directly use the domain name with HTTPS on the online server

Solution 2. Windows local development environment solution

a) Download certificate:
https://github.com/china-li-shuo/ca-cert

b) Put the downloaded Certificate in your PHP path:

D: \ wamp64 \ bin \ PHP \ php7.3.21 \ extras \ SSL this is your local PHP version path

c) Modify the php.ini file

curl.cainfo ="D:\wamp64\bin\php\php7.3.21\extras\ssl\ca-cert.crt"
openssl.cafile="D:\wamp64\bin\php\php7.3.21\extras\ssl\ca-cert.crt"

d) Just restart PHP

How to Solve 0xc1900101 Error (Win10 upgrade Win11)

Open PowerShell with administrator privileges and execute the following statement:

net stop wuauserv
net stop cryptSvc
net stop bits
net stop msiserver
ren C:\\Windows\SoftwareDistribution SoftwareDistribution.old
ren C:\\Windows\System32\catroot2 catroot2.old
net start wuauserv
net start cryptSvc
net start bits
net start msiserver

How to Solve null/hadoopbinary/wintils.exe Error

Null/Hadoop binary/wintils.exe reports an error
because Windows lacks Hadoop common package, you need to download and unzip hadoop-common-2.2.0-bin-master package

Set the environment variable in the environment variable,
1. Create Hadoop in the user variable_Home variable name, variable value is the location of common package
2. Add% Hadoop in the system variable path_HOME%\bin;
click OK to save and restart the computer

Error when starting Python in Windows

Error message

Start Python 3.6 in the windows command line environment and report the following error

C:\Users\gaozh>python
Python 3.6.1 |Anaconda 4.4.0 (64-bit)| (default, May 11 2017, 13:25:24) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Failed calling sys.__interactivehook__
Traceback (most recent call last):
  File "C:\Anaconda3\lib\site.py", line 418, in register_readline
    readline.read_history_file(history)
  File "C:\Anaconda3\lib\site-packages\pyreadline\rlmain.py", line 165, in read_history_file
    self.mode._history.read_history_file(filename)
  File "C:\Anaconda3\lib\site-packages\pyreadline\lineeditor\history.py", line 82, in read_history_file
    for line in open(filename, 'r'):
UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 407: illegal multibyte sequence

terms of settlement

The way to solve this problem is to modify the corresponding code in line 82 of the file C: \ anaconda3 \ lib \ site packages \ pyreadline \ lineeditor \ history. Py , add the coding format as UTF-8 , and then restart python.

Reference articles

https://github.com/pyreadline/pyreadline/issues/38

Error in installing paddlenlp on pip on Windows

1. PIP installation paddlenlp reports an error

An error is reported when PIP installs paddlenlp on windows, as follows:

 distutils.errors.DistutilsError: Command '['C:\\Users\\yuanyangping\\.conda\\envs\\yyp_paddle\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\YUANYA~1\\AppData\\Local\\Temp\\tmphix_2c5i', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.

Some methods to solve the problem are queried, but they are not effective, so they are not listed one by one.

2. Solutions

Pay attention to one detail. It is normal to download paddlenlp, but an error is reported only after downloading seqeval, as follows:

Collecting paddlenlp
  Downloading http://mirrors.aliyun.com/pypi/packages/b0/7d/6c24cda54d018d350ee342f715523ade7871660444ed95f3d3e753d6f388/paddlenlp-2.0.8-py3-none-any.whl (571 kB)
     |████████████████████████████████| 571 kB 467 kB/s
Collecting seqeval
  Downloading http://mirrors.aliyun.com/pypi/packages/9d/2d/233c79d5b4e5ab1dbf111242299153f3caddddbb691219f363ad55ce783d/seqeval-1.2.2.tar.gz (43 kB)
     |████████████████████████████████| 43 kB 656 kB/s
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\yuanyangping\.conda\envs\yyp_paddle\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\YUANYA~1\\AppData\\Local\\Temp\\pip-install-n4_d0gwa\\seqeval_6f8ecdc805df4aa092ecc3df7994196f\\setup.py'"'"'; __file__='"'"'C:\\Users\\YUANYA~1\\AppData\\Local\\Temp\\pip-install-n4_d0gwa\\seqeval_6f8ecdc805df4aa092ecc3df7994196f\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\YUANYA~1\AppData\Local\Temp\pip-pip-egg-info-zp58k0dh'

Therefore, can you install seqeval first and then paddlenlp, and execute two commands in succession, as follows:

pip install seqeval
pip install paddlenlp

Then paddlenlp is successfully installed
If an error is still reported, specify the version of seqeval as 0.0.3

3. Extension

The above reason should be that there is a problem with the configuration information when downloading and installing seqeval
therefore, if similar error reports occur when installing other software, you can install the software where the error is reported first, and then install the main software you want to install.

Error during session start; please check your PHP and/or webserver log file and configure your PHP

Environment: Windows Server 2008 R2 IIS7.5 PHP7.3+
Error:
Error during session start; please check your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser.
Solution:
Permissions problem, Windows – temp set IIS_IUSRS write permissions, solved.

Error 3 error C2065: ‘endl‘ : undeclared identifier-Error 2 error C2065: ‘cout‘ : undeclared identif

As you can see, I just want to print something, and iostream is added, but that means I cout can’t use it.

hold   If StdAfx. H is placed at the front of the whole file, no error will be reported

In fact, if other header files are mentioned to the front, an error will be reported – this may be the provision of VS2010,   StdAfx. H must be first.

 

Even if you comment it out   All include in StdAfx. H are commented out. Whether the compilation passes or not.

 

 

The vscode installation plug-in liveserver specified browser reported an error and could not be found

Problem Description:

After installing vscode, you do not want to use the default IE browser. You want to specify chrome or Firefox, but install the plug-in lever server or other browser plug-ins. When specifying the default browser, windows reports an error and cannot find chrome or Firefox
after reading many posted on the Internet, they are configured in settings.json. After personal practice, they have no effect. Later, after their own exploration, they found that the plug-in can’t find your chrome or Firefox. It’s not that you haven’t installed it on your computer, let alone on disk C; But because when a plug-in such as lever server specifies a browser, the windows system will find the installation directory of the software according to the system variables.

terms of settlement:

1. Open the control panel of the computer – & gt; System and security —– & gt; System
2. Open advanced system settings, click environment variables, system variables, and add a new variable named path: D: \ Kiki \ Mozilla Firefox
this directory is the directory where your Google or Firefox exe files are located
3. After configuring environment variables and saving, restart vscode