Tag Archives: Software

[Solved] Pycham Error: non zero exit code (2)

preface

When using pycharm to install a third-party package in the python virtual environment in Python interpreter settings, it is likely to report an error: non zero exit code (2), as shown in the figure:

even upgrading pip will report an error, as shown in the figure:

Tips are as follows:

Try to run this command from the system terminal. 
Make sure that you use the correct version of 'pip' installed for your Python interpreter located at 
'D:\Program Files\Python\py36-basic-v\Scripts\python.exe'.

As above belongs, the official says the possible reason is that pip is not installed in the specified directory of the virtual environment, and suggests running the pip command in the terminal to install the third-party package.

The official hint has a certain degree of reasonableness, but it does not try all cases, you can check whether the pip module exists in the directory of the virtual environment, if it does not exist, the pip module can be installed in the specified directory; if it exists, it is not the problem of the pip module path, so what exactly is the reason?

After investigation, it is the problem of pip version, my Python version is 3.6, pip version is 21.3.1, this version of pip will definitely appear the problem, the solution is also very simple, the pip version can be downgraded to 20.2.4, operation method see the following program 2: Downgrade pip version. (It is not recommended to upgrade pip, because new versions of pip may have the same problem)

Solution 1 (recommended): install the third-party package using the terminal terminal

Click Terminal at the bottom of pycharm toolbar , as shown in the following figure:

enter the PIP install command to install the third-party package, as shown in the figure:

But this solution treats the symptom but not the root cause, the problem is not solved, only the installation of third-party packages by alternative methods, if you want to solve the problem at all, please see solution 2 below.

Solution 2 (fundamental solution): downgrade the PIP version

First, open a project using pycharm. If there is no Python environment, you need to create a virtual environment first, as shown in the following figure:

In file - Settings - Python interpreter, we can see that the version of PIP in Python virtual environment is 21.3.1. As shown in the figure below, we need to downgrade the version of Pip to 20.2.4

Click Terminal on the toolbar at the bottom of pychart, as shown in the following figure:

enter the following command. Note that there must be Python -m, otherwise there is no permission:

python -m pip install pip==20.2.4

After entering the command, the following prompt appears to prove that the downgrade is successful:

enter the command PIP - V to view the current PIP version, as shown in the following figure:

the problem has been successfully solved so far. The third-party package can be successfully installed in Settings, as shown in the following figure:

[Solved] Unity Error: Got null handle from IDXGIResource::GetSharedHandle

preface

Unity reports an error when playing the video: got null handle from idxgiresource:: getsharedhandle, which shows that the running program cannot play the video, but the sound can be heard. This problem is likely to be related to AMD’s unique display. If this error occurs, you can try the following solutions.

This solution takes the windows platform as an example, and other platform solutions are similar.

Solution

First of all, ensure the normal operation of the computer amd display driver, and ensure that unity automatically calls amd display. (if unity does not automatically call amd graphics card, you can add unity program at amd graphics card control panel.)

Open Edit - project settings in unity, select player , select PC platform, uncheck auto graphics APIs for windows in the options of other settings , and add Vulkan at graphics APIs for windows below the options, Delete or adjust the default direct3d11 to Vulkan , as shown in the following figure. After adjustment, you will be prompted to restart the unity editor. You can restart it. If you try to run again, you will not report an error.

Python PIP TypeError: expected str, bytes or os.PathLike object, not int

Exception:
Traceback (most recent call last):
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/site-packages/pip/basecommand.py”, line 215, in main
status = self.run(options, args)
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/site-packages/pip/commands/list.py”, line 157, in run
packages = self.get_outdated(packages, options)
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/site-packages/pip/commands/list.py”, line 168, in get_outdated
dist for dist in self.iter_packages_latest_infos(packages, options)
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/site-packages/pip/commands/list.py”, line 168, in
dist for dist in self.iter_packages_latest_infos(packages, options)
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/site-packages/pip/commands/list.py”, line 197, in iter_packages_latest_infos
with self._build_session(options) as session:
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/site-packages/pip/basecommand.py”, line 69, in _build_session
if options.cache_dir else None
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/posixpath.py”, line 78, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not int
Traceback (most recent call last):
File “/home/yu/anaconda3/envs/TRTC/bin/pip”, line 6, in
sys.exit(pip.main())
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/site-packages/pip/init.py”, line 249, in main
return command.main(cmd_args)
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/site-packages/pip/basecommand.py”, line 251, in main
timeout=min(5, options.timeout)) as session:
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/site-packages/pip/basecommand.py”, line 69, in _build_session
if options.cache_dir else None
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/posixpath.py”, line 78, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not int

Solution: (you can replace python with python3)
curl https://bootstrap.pypa.io/get-pip.py | python –
Guess the reason for the error is: setuptools and pip versions do not correspond, so upgrade the pip will be fine.

There was a problem sending the command to the program in Excel 2010

Environment: MicroSoft Excel 2010
Sending the Command to the program was a problem.

As shown in figure:


Solution: open Excel– & GT; File — — — — — — — — & gt; Options — — — — — — — — & gt; Senior — — — — — — — — & gt; Drop this check (ignoring other applications that use dynamic database exchange (DDE)) -& GT; To solve.
 
As shown in figure:


Resources:
http://support.microsoft.com/kb/211494
http://blog.sina.com.cn/s/blog_4988d99a0100u86i.html

Chrome Failed to load resource: net::ERR_CACHE_MISS

There is no such error message in IE/FF, but the following error message appears on the Chrome command line:
Failed to load resource: net::ERR_CACHE_MISS
The issue is a bug in the Chrome browser development tool that appears to be related to caching and has been submitted to the Chrome issues system
(https://code.google.com/p/chromium/issues/detail?Id = 424599).
Does not affect normal use, can be ignored, will be fixed in chrome40.x.x.x version.

Error when loading the SDK: Solutions

error:

when eclipse opens the following window appears (with the following contents)

Error when loading the SDK:

Error: Error parsing \Android\ t-bundle-windows-x86_64-20140702\ SDK \system-images\android-22\android-wear\armeabi-v7a\devices. XML
cdc-complex type. Invalid content starting with element ‘d:skin’ was found. There should be no child elements here. Error: Error: Error D:\Android\adt-bundle-windows-x86_64-20140702\ SDK \system-images\android-22\android-wear\x86\devices. XML
cdc-complex type. Invalid content starting with element ‘d:skin’ was found. There should be no child elements here. balabala

solution:

D:\Android\adt-bundle-windows-x86_64-20140702\ SDK \tools\ devices under lib. XML file replace

D: \ Android \ adt – bundle – Windows – x86_64-20140702 \ \ Android SDK \ system – images – 22 \ Android – wear \ armeabi – v7a and

D:\Android\adt-bundle-windows-x86_64-20140702\ SDK \system-images\android-22\android-wear\ devices under x86. XML file,

restart eclipse.


VBoxManage.exe: error: Failed to create the host-only adapter

system type and software version

  • system: Win10 professional edition
  • Vagrant: Vagrant 2.2.4
  • VM VirtualBox: 6.0.12

error message

PS E:\Develop\Vagrant\Ubuntu_ser_18_bmg> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'peru/ubuntu-18.04-server-amd64' version '20191202.01' is up to date...
==> default: Clearing any previously set network interfaces...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "create"]

Stderr: 0%...
Progress state: E_FAIL
VBoxManage.exe: error: Failed to create the host-only adapter
VBoxManage.exe: error: Could not find Host Interface Networking driver! Please reinstall
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleCreate(struct HandlerArg *)" at line 94 of file VBoxManageHostonly.cpp

error cause

Could not find Host Interface Networking driver! Please reinstall can’t find the host interface network driver! Please reinstall

then it occurred to me that before I thought the network connection inside the network card too many , in the device management > also removes the VirtualBox virtual network card driver.

because the driver is gone and you cannot create a virtual network card, start the virtual machine with the vagrant up command and throw the above error message.

solution

  1. find XXX \Oracle\VirtualBox\drivers\network\netadp6 directory, file as follows.
  2. right-click VBoxNetAdp6. Inf file, select install


3. Now execute vagrant up and the virtual machine can be started normally!