1. Windows + X opens the panel, selects to run PowerShell as an administrator, enters: set executionpolicy remotesigned, and then enters “Y” to indicate execution.
2. Execute activate again in the pycharm terminal
1. Windows + X opens the panel, selects to run PowerShell as an administrator, enters: set executionpolicy remotesigned, and then enters “Y” to indicate execution.
2. Execute activate again in the pycharm terminal
Error report of M1 chip import numpy
Environmental installation method:
miniforge – python3. 9 numpy 1.21.1
Operation error:
## terminal/pycharm error
import numpy
import pandas
Error Messages:
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
At the same time, the python version and numpy version are given, and many files in the miniforge folder no such file are mentioned repeatedly
Solution:
conda install openblas
Import again works normally
1. Turn on raspberry pie settings
sudo raspi-config
2. Select the third interface options
3. Turn all options on, and then restart raspberry pie
4.vcgencmd get_camera
The values change to 1, which can not only detect the input, but also identify the device
5. You can execute raspistill and run the python picamera program
For example: raspistill -o /home/pi/Desktop/first.jpg
Solution:
pip install pywavelets
or
pip install scikit-image
The relevant dependencies pywavelets will be installed automatically
If an error is reported later:
modulenotfounderror: no module named ‘skimage metrics‘
If the skimage version is too low, update to the latest version (or 0.18+):
pip install scikit-image --upgrade
code:
yolo_layers = [layers[i[0] - 1] for i in network.getUnconnectedOutLayers()]
report errors:
Traceback (most recent call last):
File "Run.py", line 201, in <module>
main()
File "Run.py", line 137, in main
detections = yolo.detect(yolo_img)
File "code/3D-BoundingBox-master/yolo/yolo.py", line 34, in detect
ln = [ln[i[0] - 1] for i in self.net.getUnconnectedOutLayers()]
File "code/3D-BoundingBox-master/yolo/yolo.py", line 34, in <listcomp>
ln = [ln[i[0] - 1] for i in self.net.getUnconnectedOutLayers()]
IndexError: invalid index to scalar variable.
Reason:
different opencv versions cause different output formats
Solution:
yolo_layers = [layers[i - 1] for i in network.getUnconnectedOutLayers()]
Reference:
https://stackoverflow.com/questions/69834335/loading-yolo-invalid-index-to-scalar-variable
Problem Description:
error when loading CSV format data in pandas
B = pd.read_csv("C:/Users/hp/Desktop/Hands-On Data Analysis/Unit 1 Project Collection/train.csv")
B.head(3)
report errors:
OSError: Initializing from file failed
Cause analysis:
When calling the read_csv() method of pandas, the C engine is used as the parser engine by default, and when the file name contains Chinese, using the C engine will be wrong in some cases.
Solution:
Specify the engine as Python when calling the read_csv() method
B = pd.read_csv("C:/Users/hp/Desktop/Hands-On-Data-Analysis/Unit-1-Project-Collection/train.csv",engine='python')
B.head(3)
example: print(timeit.timeit(cal_pi(100_0000),number=10000))
Because cal_PI function have parameters:
Modify to: print(timeit.timeit(lambda: cal_pi(100_0000),number=10000))
windows system:
original_keras_version = f.attrs[‘keras_version’].decode(‘utf8’)
1. error:
load_weights_from_hdf5_group
original_keras_version = f.attrs['keras_version'].decode('utf8')
AttributeError: 'str' object has no attribute 'decode'
2. Cause analysis
When installing tensorflow, the default installed h5py is 3.1.0, and an error is reported because the TF you installed does not support an excessively high version of h5py
3. Solutions
1. Uninstall h5py3 Version 1.0, installing h5py2.0 Version 10.0.2. Restart the compiler
pip install h5py==2.10.0
**
##Error reporting
**
## Analyze & Solution
the GPU is not enough. You can run normally by reducing the array
or run on the CPU
Error loading XXXX: http Error 404: not found
XXXX can be WordNet or nltk_ Any package in data
Solution:
Find the package you need → copy the corresponding address → download → unzip to “your nltk_data path \nltk_data\corpora”
For example: “wordnet_ic” “https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/corpora/ wordnet_ic.zip”
<package id="wordnet_ic"
name="WordNet-InfoContent"
version="3.0"
webpage="http://wn-similarity.sourceforge.net"
unzip="1"
unzipped_size="34220359"
size="12056682"
checksum="25f0185b31693fa11ea898e4feda528c"
subdir="corpora"
url="https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/corpora/wordnet_ic.zip" />
2. Unzip directly
when we install nltk, XXX.Zip will be included in “your nltk_data path\nltk_data\corpora”. We can first search to see if the package you need exists in the corpora directory. If so, just unzip it directly. Easy.
My own computer uses a Mac. During the installation of cytoolz, errors are reported. There are a lot of error information. The key is:
ERROR: Failed building wheel for cytoolz
error: command ‘/usr/bin/clang’ failed with exit code 1
Solution:
On the command line: Xcode select — install
Just install it again.
There was an error querying the version of Ubuntu after installing PIP3
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 7, in <module>
from pip._internal.cli.main import main
File "/usr/local/lib/python3.5/dist-packages/pip/_internal/cli/main.py", line 57
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax
Solution:
wget https://bootstrap.pypa.io/pip/3.5/get-pip.py
After downloading, execute the following command
python3 get-pip.py