Tag Archives: pip

Collection and solution of error reporting on various platforms of pyspider

Collection and solution of error reporting in pyspider

Command “python setup.py egg_ info” failed with error code 10

This means that pycurl installation reported an error

Download address of WHL file of pycurl in win10 solution

# Follow the link above to download the pycurl whl file, pay attention to your own python version, I'm using python 3.7 here
# locate the path to change the file
pip3 install pycurl-7.43.0.4-cp37-cp37m-win_amd64.whl

CentOS solution

yum install python-devel curl-devel
pip3 install pycurl

Ubuntu solution

sudo apt-get install libcurl4-gnutls-dev
pip install pyspider

SyntaxError: invalid syntax

Async cannot be used as a keyword and needs to be changed as a variable

Run pyspider to find the error file and replace async to know that the error was not reported

ImportError: cannot import name ‘Disp

[Python] pip.vendor.urllib3.exceptions.readtimeouterror: httpsconnectionpool protocol

When installing a python module with pip or pychar, you sometimes encounter a readtimeout error. The reason for this problem is probably the network speed

my default source is Tsinghua, sometimes the link network is not good ( the day after the college entrance examination today, it is estimated that there are too many visitors, everyone wants to go to Tsinghua, ha ha ), so I change the source.

pip --default-timeout=100 install pyspark -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

Perfect solution

Processing method of PIP exception no module named ‘pip’

1、 Pip is not installed
most of the current versions of python (2.7.9 + or 3.4 +) come with PIP. You can use the following command first:
PIP -- version (Python 2. + version)
PIP3 -- version (Python 3. + version)
try to check the version of PIP. If it can be displayed normally, PIP should have been installed.

If pip is not installed, the official download address of PIP is:
0 https://pypi.org/project/pip/

Installation:
Step 1: decompress
Step 2: open the console at the decompressed position
Step 3: use the command Python setup.py install
Step 4: check whether the PIP is installed again, if not, restart the computer

2、 The missing environment variable
may be that the option of add path was not checked when installing python, and the path of Python and pip.exe needs to be added to the environment variable manually
e.g:
C:\Users\Example\AppData\Local\Programs\Python\Python39-32;

and
C: users, example, appdata, local programs, python, python39-32, scripts Python comes with PIP, but when it is used to install packages, it will still report “no mouse named ‘pip'”<
use the command:
Python - M ensurepip

after the installation, PIP can be used normally.

Python PIP Fatal error in launcher: Unable to create process using ‘“e:\program files\programdata

Error content

Fatal error in launcher: Unable to create process using '"e:\program 
files\programdata\python3.9\python.exe"  "E:\Program Files\ProgramData
\Python39\Scripts\pip.exe" ': ???????????

Solution

python -m pip install --upgrade pip

Problem solving
there is a problem with PIP. Updating PIP through Python will delete the wrong PIP and install the updated pip

The solution of no module named ‘jinja2. Asyncsupport’

Background of the problem

When compiling Px4,

make px4_sitl_default gazebo

An error has been reported,

[0/535] Performing build step for 'sitl_gazebo'
[1/9] Generating /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/mb1240-xl-ez4/mb1240-xl-ez4-gen.sdf
FAILED: /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/mb1240-xl-ez4/mb1240-xl-ez4-gen.sdf 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/python3 /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/mb1240-xl-ez4/mb1240-xl-ez4.sdf.jinja /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo
Traceback (most recent call last):
  File "/home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py", line 4, in <module>
    import jinja2
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 82, in <module>
    _patch_async()
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 78, in _patch_async
    from jinja2.asyncsupport import patch_all
ModuleNotFoundError: No module named 'jinja2.asyncsupport'
[2/9] Generating /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/pixhawk/pixhawk-gen.sdf
FAILED: /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/pixhawk/pixhawk-gen.sdf 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/python3 /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/pixhawk/pixhawk.sdf.jinja /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo
Traceback (most recent call last):
  File "/home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py", line 4, in <module>
    import jinja2
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 82, in <module>
    _patch_async()
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 78, in _patch_async
    from jinja2.asyncsupport import patch_all
ModuleNotFoundError: No module named 'jinja2.asyncsupport'
[3/9] Generating /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/matrice_100/matrice_100-gen.sdf
FAILED: /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/matrice_100/matrice_100-gen.sdf 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/python3 /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/matrice_100/matrice_100.sdf.jinja /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo
Traceback (most recent call last):
  File "/home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py", line 4, in <module>
    import jinja2
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 82, in <module>
    _patch_async()
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 78, in _patch_async
    from jinja2.asyncsupport import patch_all
ModuleNotFoundError: No module named 'jinja2.asyncsupport'
[4/9] Generating /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/r200/r200-gen.sdf
FAILED: /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/r200/r200-gen.sdf 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/python3 /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/r200/r200.sdf.jinja /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo
Traceback (most recent call last):
  File "/home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py", line 4, in <module>
    import jinja2
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 82, in <module>
    _patch_async()
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 78, in _patch_async
    from jinja2.asyncsupport import patch_all
ModuleNotFoundError: No module named 'jinja2.asyncsupport'
[5/9] Generating /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/c920/c920-gen.sdf
FAILED: /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/c920/c920-gen.sdf 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/python3 /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/c920/c920.sdf.jinja /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo
Traceback (most recent call last):
  File "/home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py", line 4, in <module>
    import jinja2
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 82, in <module>
    _patch_async()
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 78, in _patch_async
    from jinja2.asyncsupport import patch_all
ModuleNotFoundError: No module named 'jinja2.asyncsupport'
[6/9] Generating /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/px4flow/px4flow-gen.sdf
FAILED: /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/px4flow/px4flow-gen.sdf 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/python3 /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/px4flow/px4flow.sdf.jinja /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo
Traceback (most recent call last):
  File "/home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py", line 4, in <module>
    import jinja2
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 82, in <module>
    _patch_async()
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 78, in _patch_async
    from jinja2.asyncsupport import patch_all
ModuleNotFoundError: No module named 'jinja2.asyncsupport'
[7/9] Generating /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/3DR_gps_mag/3DR_gps_mag-gen.sdf
FAILED: /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/3DR_gps_mag/3DR_gps_mag-gen.sdf 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/python3 /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/3DR_gps_mag/3DR_gps_mag.sdf.jinja /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo
Traceback (most recent call last):
  File "/home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py", line 4, in <module>
    import jinja2
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 82, in <module>
    _patch_async()
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 78, in _patch_async
    from jinja2.asyncsupport import patch_all
ModuleNotFoundError: No module named 'jinja2.asyncsupport'
[8/9] Generating /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/sf10a/sf10a-gen.sdf
FAILED: /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/sf10a/sf10a-gen.sdf 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/python3 /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/sf10a/sf10a.sdf.jinja /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo
Traceback (most recent call last):
  File "/home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py", line 4, in <module>
    import jinja2
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 82, in <module>
    _patch_async()
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 78, in _patch_async
    from jinja2.asyncsupport import patch_all
ModuleNotFoundError: No module named 'jinja2.asyncsupport'
[9/9] Generating /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf
FAILED: /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf 
cd /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo && rm -f /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf && /usr/bin/python3 /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/xacro.py -o /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.urdf /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.xacro enable_mavlink_interface:=true enable_ground_truth:=false enable_wind:=false enable_logging:=false rotors_description_dir:=/home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/rotors_description send_vision_estimation:=true send_odometry:=false && gz sdf -p /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.urdf >> /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf && rm -f /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.urdf

gz: symbol lookup error: /usr/lib/x86_64-linux-gnu/libgazebo_common.so.9: undefined symbol: _ZN8ignition10fuel_tools12ClientConfig12SetUserAgentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
ninja: build stopped: subcommand failed.
[2/535] Generating mixer_multirotor.generated.h
FAILED: src/lib/mixer/MultirotorMixer/mixer_multirotor.generated.h 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/src/lib/mixer/MultirotorMixer && /usr/bin/python3 /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/tools/px_generate_mixers.py -f /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/dodeca_bottom_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/dodeca_top_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_plus.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_t.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_x.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_cox_wide.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_plus.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_x.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_deadcat.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_h.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_plus.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_s250aq.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_vtail.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_wide.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_x_cw.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_x.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_x_pusher.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_y.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/tri_y.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/twin_engine.toml -o mixer_multirotor.generated.h
Failed to import numpy: 
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

Original error was: cannot import name 'multiarray'


You may need to install it using:
    pip3 install --user numpy

[3/535] Generating mixer_multirotor_normalized.generated.h
FAILED: src/lib/mixer/MultirotorMixer/mixer_multirotor_normalized.generated.h 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/src/lib/mixer/MultirotorMixer && /usr/bin/python3 /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/tools/px_generate_mixers.py --normalize -f /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/dodeca_bottom_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/dodeca_top_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_plus.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_t.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_x.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_cox_wide.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_plus.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_x.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_deadcat.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_h.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_plus.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_s250aq.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_vtail.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_wide.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_x_cw.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_x.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_x_pusher.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_y.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/tri_y.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/twin_engine.toml -o mixer_multirotor_normalized.generated.h
Failed to import numpy: 
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

Original error was: cannot import name 'multiarray'


You may need to install it using:
    pip3 install --user numpy

[4/535] Generating mixer_multirotor_6dof.generated.h
FAILED: src/lib/mixer/MultirotorMixer/mixer_multirotor_6dof.generated.h 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/src/lib/mixer/MultirotorMixer && /usr/bin/python3 /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/tools/px_generate_mixers.py --sixdof -f /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/dodeca_bottom_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/dodeca_top_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_plus.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_t.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_x.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_cox_wide.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_plus.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_x.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_deadcat.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_h.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_plus.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_s250aq.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_vtail.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_wide.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_x_cw.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_x.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_x_pusher.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_y.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/tri_y.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/twin_engine.toml -o mixer_multirotor_6dof.generated.h
Failed to import numpy: 
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

Original error was: cannot import name 'multiarray'


You may need to install it using:
    pip3 install --user numpy

[5/535] Generating serial_params.c
FAILED: generated_params/serial_params.c 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/src/lib/parameters && /usr/bin/cmake -E make_directory /home/zth/catkin_ws/Firmware/build/px4_sitl_default/generated_params && /usr/bin/python3 /home/zth/catkin_ws/Firmware/Tools/serial/generate_config.py --params-file /home/zth/catkin_ws/Firmware/build/px4_sitl_default/generated_params/serial_params.c --serial-ports --config-files /home/zth/catkin_ws/Firmware/src/lib/battery/module.yaml /home/zth/catkin_ws/Firmware/src/drivers/gps/module.yaml /home/zth/catkin_ws/Firmware/src/modules/mavlink/module.yaml
Failed to import jinja2: No module named 'jinja2.asyncsupport'

You may need to install it using:
    pip3 install --user jinja2

FAILED: external/Stamp/sitl_gazebo/sitl_gazebo-build 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/cmake --build .
ninja: build stopped: subcommand failed.
Makefile:198: recipe for target 'px4_sitl_default' failed
make: *** [px4_sitl_default] Error 1

The first mistake is:

ModuleNotFoundError: No module named 'jinja2.asyncsupport'

Solution process:

1. Install jinja2 according to the command given in the error prompt:

zth@SugoAsurada:~/catkin_ws/Firmware$ pip install jinja2
Collecting jinja2
  Using cached https://files.pythonhosted.org/packages/30/9e/f663a2aa66a09d838042ae1a2c5659828bb9b41ea3a6efa20a20fd92b121/Jinja2-2.11.2-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from jinja2)
  Downloading https://files.pythonhosted.org/packages/fb/40/f3adb7cf24a8012813c5edb20329eb22d5d8e2a0ecf73d21d6b85865da11/MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl
Installing collected packages: MarkupSafe, jinja2
Successfully installed MarkupSafe-1.1.1 jinja2-2.11.2

The version of jinja2 installed with this command is 2.11.2.
In ~ / catkin_ View the version of jinja2 under the directory WS / firmware,

zth@SugoAsurada:~/catkin_ws/Firmware$ python
Python 2.7.17 (default, Sep 30 2020, 13:38:04) 
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import jinja2
>>> jinja2.__version__
'2.10'
>>> exit()

The resulting version is 2.10.
Obviously, jinja2 was not installed in the path we needed.

2. Check the location of jinja2 in the current path, and find the cause of the problem

zth@SugoAsurada:~/catkin_ws/Firmware$ python
Python 2.7.17 (default, Sep 30 2020, 13:38:04) 
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import jinja2
>>> jinja2.__file__
'/usr/lib/python2.7/dist-packages/jinja2/__init__.pyc'
>>> exit()

After coming to the directory ‘/ usr / lib / python2.7/dist-packages/jinja2’, I found that there are no files in the directory asyncsupport.py . The PY file is missing from the official website.

3. Delete jinja2 from the specified directory and install a new jinja2

Unload command:

sudo  rm -r /usr/lib/python2.7/dist-packages/jinja2

Output results:

zth@SugoAsurada:~/catkin_ws/Firmware$ sudo  rm -r /usr/lib/python2.7/dist-packages/jinja2
zth@SugoAsurada:~/catkin_ws/Firmware$ python
Python 2.7.17 (default, Sep 30 2020, 13:38:04) 
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import jinja2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named jinja2
>>> exit()

Installation command:

sudo pip install jinja2 --target=/usr/lib/python2.7/dist-packages

Inspection output:

zth@SugoAsurada:~/catkin_ws/Firmware$ python
Python 2.7.17 (default, Sep 30 2020, 13:38:04) 
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import jinja2
>>> jinja2.__file__
'/usr/lib/python2.7/dist-packages/jinja2/__init__.pyc'
>>> jinja2.__version__
'2.11.2'
>>> exit()

Solution of error reporting in PIP installation of iPhone

Today, I encountered a problem when configuring pycaffe environment. I need to execute it when installing the library

for req in $(cat requirements.txt); do pip install $req; done
sudo pip install -r requirements.txt

Command, always report red error. Finally, sort it out.

First, there are various kinds of permission denied, which are finally solved by the root account operation.
Next, after all the others are installed, it’s hard to install IPython. You can install it with PIP install IPython
alone, and the error is:
command "Python" setup.py egg_ Info "failed with error code 1 in/TMP/pip-build-a63c8f/IPython/
after searching, we find the reason: the default version of IPython is too high, so we can only reduce the version manually.

pip install ipython==8888

The above command entered a non-existent version, so that all existing versions will be listed in the prompt.

After trying, the 6 and above versions all report errors, and finally use the highest version of 5.

sudo pip install ipython==5.5.0

Execute sudo PIP install - R again requirements.txt , there is a piece of requirement already satisfied . It's done!

ps:

    for reference only: my PIP version is manually upgraded to 9.0.2, and the python version comes with 2.7; warm tips: try to use root user to operate the whole process, not sudo, which can save a lot of trouble.

Could not install packages due to anenvironment error: [winerror 5] access denied

I’ve been learning Python before, but I’m not familiar with PIP

Every time you install a package, PIP will

You are asked to install the updated version of PIP, which is 10.1

But after the update, when installing other libraries, we habitually install the libraries in the same way as before

This is a problem

Due to time constraints, pip10.1 has no time to study. I want to go back, but I can’t

Look at the wrong requirements

Just Python – M PIP install — user — upgrade PIP = = 9.0.3

Just add a — user

As for why, I don’t know. I’ll be in a hurry when I have a problem. I can use it

If you still report an error when installing some packages after returning!!

I often encounter this error, and I feel that the online solutions are a bit messy

Just add a — user directly after install

To solve Anaconda error: command error out with exit status 1

Development environment:

win10 x64

cuda10.0

anaconda4.0.0

 

catalog

1. PIP error: cannot open D: anaconda3/scripts/pip- script.py

2. PIP switches domestic sources

3. Solve SciPy error: importerror: cannot import name ‘show_ config’ from ‘numpy’ (unknown location) 

4. Solve the problem of error: command error out with exit status 1

5. After installing scikit learn, it can be imported, but the running error is: importerror: DLL load failed: the specified program cannot be found

 

—————————————————————————————————————————————————————-

 

This error is due to the dependency package version is too high (too new).

Phenomenon restore: install scikit learn with anaconda, and then install Matplotlib to report the above error.

Solution: the installed version of Matplotlib is too high, and it can be solved by reducing the version.

 

 

However, this is not the end. Generally, scikit learn installed with the CONDA command may import normally, but it is easy to report an error when using it

The solution is to uninstall sklearn, and then use pip to install it again. However, if you directly use the PIP install scikit learn command to install it, there may be errors, and the process of installing again will be very complicated

See:

After installing sklearn, it can be imported normally, but an error is reported

 

Welcome to my personal blog: the road of machine learning

 

PIP installation error: Microsoft Visual C + + 14.0 is required perfect solution

In the process of using Python development, we often need to install various modules, but we often encounter various errors in the installation process, such as: error: Microsoft Visual C + + 14.0 is required, this error is due to the lack of C + + compiler components.

There are two solutions to this problem

One is to directly download the corresponding wheel file for installation, providing three download addresses:

Tsinghua download (domestic site, fast speed) https://pypi.tuna.tsinghua.edu.cn/simple/pip/

Official download: https://pypi.org/project/face-recognition/1.0.0/#files

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

Another solution is to install the missing components.

As for the second solution, I believe most people will download a visual studio 201x and install it as I used to. However, installing a vs takes up a lot of space, not to mention the key. Some people find it useless after installation, which is really irritating.

After all kinds of search, it was found that the C + + runtime provided by the government can be directly installed, which can be solved perfectly. The address is Microsoft Visual C + + build tools 2015

 

After downloading, double-click run to install with default settings. After the installation, go to PIP install XXX to show that the installation is successful.

 

Welcome to my personal blog: the road of machine learning

Error from Python installation Library: Microsoft Visual C + + 14.0 is required

Error: Microsoft Visual C + + 14.0 is required. Get it with Microsoft Visual C + +

Error: Microsoft Visual C + + 14.0 is required. Get it with “build tools for visual studio”: https://visualstudio.microsoft.com/downloads/

Finally, a Microsoft Visual C + + build tools 2015
is found https://go.microsoft.com/fwlink/?LinkId=691126
The file name is: visual cppbuildtools full, download and install.

Double click visual cppbuilder tools_ full.exe , select the default, click Install, and wait about 10 minutes to complete the installation.
Then install the PIP library.

The scheme failed with ‘command’ failed

PIP install pylibmc installation failure and its solution. During installation, the following errors are reported, and there may be other errors, similar to the following:

pip install pylibmc==1.6.1
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pylibmc==1.6.1
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a7/0c/f7a3af34b05c167a69ed1fc330b06b658dac4ab25b8632c52d1022dd5337/pylibmc-1.6.1.tar.gz (64 kB)
Building wheels for collected packages: pylibmc
  Building wheel for pylibmc (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/yangchangjia/PycharmProjects/Nox/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py'"'"'; __file__='"'"'/private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-wheel-73t1n0ft
       cwd: /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/
  Complete output (28 lines):
  /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py:98: DeprecationWarning: 'U' mode is deprecated
    with open("README.rst", "U", encoding="utf-8") as r:
  /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py:100: DeprecationWarning: 'U' mode is deprecated
    with open("src/pylibmc-version.h", "U", encoding="utf-8") as r:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.15-x86_64-3.8
  creating build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/autoconf.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/pools.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/client.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/__init__.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/test.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/consts.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/__main__.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  running build_ext
  building '_pylibmc' extension
  creating build/temp.macosx-10.15-x86_64-3.8
  creating build/temp.macosx-10.15-x86_64-3.8/src
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -DUSE_ZLIB -I/Users/yangchangjia/PycharmProjects/Nox/venv/include -I/Users/yangchangjia/.pyenv/versions/3.8.6/include/python3.8 -c src/_pylibmcmodule.c -o build/temp.macosx-10.15-x86_64-3.8/src/_pylibmcmodule.o -fno-strict-aliasing -std=c99
  In file included from src/_pylibmcmodule.c:34:
  src/_pylibmcmodule.h:42:10: fatal error: 'libmemcached/memcached.h' file not found
  #include <libmemcached/memcached.h>
           ^~~~~~~~~~~~~~~~~~~~~~~~~~
  1 error generated.
  error: command 'clang' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pylibmc
  Running setup.py clean for pylibmc
Failed to build pylibmc
Installing collected packages: pylibmc
    Running setup.py install for pylibmc ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/yangchangjia/PycharmProjects/Nox/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py'"'"'; __file__='"'"'/private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-record-tox14kc6/install-record.txt --single-version-externally-managed --compile --install-headers /Users/yangchangjia/PycharmProjects/Nox/venv/include/site/python3.8/pylibmc
         cwd: /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/
    Complete output (28 lines):
    /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py:98: DeprecationWarning: 'U' mode is deprecated
      with open("README.rst", "U", encoding="utf-8") as r:
    /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py:100: DeprecationWarning: 'U' mode is deprecated
      with open("src/pylibmc-version.h", "U", encoding="utf-8") as r:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.15-x86_64-3.8
    creating build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/autoconf.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/pools.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/client.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/__init__.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/test.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/consts.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/__main__.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    running build_ext
    building '_pylibmc' extension
    creating build/temp.macosx-10.15-x86_64-3.8
    creating build/temp.macosx-10.15-x86_64-3.8/src
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -DUSE_ZLIB -I/Users/yangchangjia/PycharmProjects/Nox/venv/include -I/Users/yangchangjia/.pyenv/versions/3.8.6/include/python3.8 -c src/_pylibmcmodule.c -o build/temp.macosx-10.15-x86_64-3.8/src/_pylibmcmodule.o -fno-strict-aliasing -std=c99
    In file included from src/_pylibmcmodule.c:34:
    src/_pylibmcmodule.h:42:10: fatal error: 'libmemcached/memcached.h' file not found
    #include <libmemcached/memcached.h>
             ^~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    error: command 'clang' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/yangchangjia/PycharmProjects/Nox/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py'"'"'; __file__='"'"'/private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-record-tox14kc6/install-record.txt --single-version-externally-managed --compile --install-headers /Users/yangchangjia/PycharmProjects/Nox/venv/include/site/python3.8/pylibmc Check the logs for full command output.

Solution:

brew install libmemcached
pip install wheel
pip install pylibmc

Installation successful:

pip install pylibmc
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pylibmc
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a7/0c/f7a3af34b05c167a69ed1fc330b06b658dac4ab25b8632c52d1022dd5337/pylibmc-1.6.1.tar.gz (64 kB)
Building wheels for collected packages: pylibmc
  Building wheel for pylibmc (setup.py) ... done
  Created wheel for pylibmc: filename=pylibmc-1.6.1-cp38-cp38-macosx_10_15_x86_64.whl size=33323 sha256=9a8ecb4933b8a455b7ffe9db042011f3a9865c18441b8e5204d843bc0e6da1a3
  Stored in directory: /Users/yangchangjia/Library/Caches/pip/wheels/a1/8e/7e/d1b6684901c01de15a45efb8b5172c1dc7b9c6a7386d369839
Successfully built pylibmc
Installing collected packages: pylibmc
Successfully installed pylibmc-1.6.1