ERROR: Could not build wheels for opencv-python-headless which use PEP 517 and cannot be installed directly
Solution:
upgrade pip
pip install --upgrade pip
ERROR: Could not build wheels for opencv-python-headless which use PEP 517 and cannot be installed directly
Solution:
upgrade pip
pip install --upgrade pip
Error Messages:
Exception in thread Thread-3:
Traceback (most recent call last):
File "/home/comz/anaconda3/envs/arcface/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/home/comz/anaconda3/envs/arcface/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "usb_camera.py", line 140, in <lambda>
Process(target=lambda: asyncio.run(upload_loop())).start()
File "/home/comz/anaconda3/envs/arcface/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/home/comz/anaconda3/envs/arcface/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
return future.result()
File "usb_camera.py", line 51, in upload_loop
await sio.connect(url)
File "/home/comz/anaconda3/envs/arcface/lib/python3.7/site-packages/socketio/asyncio_client.py", line 117, in connect
raise exceptions.ConnectionError(exc.args[0]) from None
socketio.exceptions.ConnectionError: OPEN packet not returned by server
Solution:
pip install python-engineio==3.14.2 python-socketio==4.6.0
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
try:
# browser = webdriver.Chrome('Here is the path to chrome')
s = Service(r"/opt/apps/cn.google.chrome/files/chrome")
driver = webdriver.Chrome(service=s)
driver.get('https://www.baidu.com')
except Exception as e:
print(e)
When running this code, an error is reported. You need to put the chrome file and chromedriver in the same directory
Just add the path
Error demonstration
class Solution(object):
def fib(self,n):
"""
:type n: int
:rtype: int
"""
while(n>0):
if(n==1 or n==2):
return 1
else:
return fib(n-1)+fib(n-2)#error
return
'''
NameError: global name 'fib' is not defined
return fib(n-1)+fib(n-2)
Line 11 in fib (Solution.py)
ret = Solution().fib(param_1)
Line 36 in _driver (Solution.py)
_driver()
Line 48 in <module> (Solution.py)
'''
Solution:
class Solution(object):
def fib(self,n):
"""
:type n: int
:rtype: int
"""
while(n>0):
if(n==1 or n==2):
return 1
else:
return self.fib(n-1)+self.fib(n-2)#Modified
return 0
Failed environment install leads to “unable to create process using” error
Maybe it’s because there are too many environments installed in CONDA, and you copy them yourself. Suddenly, CONDA fails.
As long as you enter CONDA activate, it will report
Fatal error in launcher: Unable to create process using '"d:\project\gae_gan\ddgk\venv\scripts\python.exe" "D:\Programs\Anaconda3\Scripts\conda.exe" '
Error.
Finally found a very simple solution
Enter directly in the console
***\Anaconda3\Scripts\activate
Then restart console to be fine!
Referenec:
https://stackoverflow.com/questions/59721699/anaconda-is-unable-to-create-process-on-windows10
Error Messages: RuntimeError: version_ <= kMaxSupportedFileFormatVersion INTERNAL ASSERT FAILED at /pytorch/caffe2/serialize/inline_container.cc:132, please report a bug to PyTorch. Attempted to read a PyTorch file with version 3, but the maximum supported version for reading is 2. Your PyTorch installation may be too old. (init at /pytorch/caffe2/serialize/inline_container.cc:132) frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x33 (0x7fdcd0189193 in /home/a430/intel/intelpython3/envs/zayn/lib/python3.6/site-packages/torch/lib/libc10.so) frame #1: caffe2::serialize::PyTorchStreamReader::init() + 0x1f5b (0x7fdcd33119eb in /home/a430/intel/intelpython3/envs/zayn/lib/python3.6/site-packages/torch/lib/libtorch.so) frame #2: caffe2::serialize::PyTorchStreamReader::PyTorchStreamReader(std::string const&) + 0x64 (0x7fdcd3312c04 in /home/a430/intel/intelpython3/envs/zayn/lib/python3.6/site-packages/torch/lib/libtorch.so) frame #3: <unknown function> + 0x6c53a6 (0x7fdd1b2423a6 in /home/a430/intel/intelpython3/envs/zayn/lib/python3.6/site-packages/torch/lib/libtorch_python.so) frame #4: <unknown function> + 0x2961c4 (0x7fdd1ae131c4 in /home/a430/intel/intelpython3/envs/zayn/lib/python3.6/site-packages/torch/lib/libtorch_python.so) <omitting python frames>
Some people say there is a problem with the torch version. My torch version is 1.4.0, try upgrading to 1.6.0, torchvision was upgraded to 0.7.0, this problem will be reported:
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.
Just follow the hint and add map_location=torch.device(‘cpu’) when loading the model, as follows:
best_model = torch.load("../weights/September01-Unet-se_resnext50_32x4d/checkpoint.pth.tar", map_location=torch.device('cpu'))
Error:
runtimeerror: one of the variables needed for gradient computation has been modified by an inplace operation
Analysis: the new version of pytorch integrates variable and tensor into one tensor, and the inplace operation can be used for variable before, but errors will occur when using tensor
Check whether there is the following expression
x += res #error
Change to
x = x + res
No error is reported
1. Execute
npm install
The following errors are reported
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (/home/h5/my-vue/node_modules/node-gyp/lib/configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (/home/h5/my-vue/node_modules/node-gyp/lib/configure.js:406:16)
gyp ERR! stack at F (/home/h5/my-vue/node_modules/which/which.js:68:16)
gyp ERR! stack at E (/home/h5/my-vue/node_modules/which/which.js:80:29)
gyp ERR! stack at /home/h5/my-vue/node_modules/which/which.js:89:16
gyp ERR! stack at /home/h5/my-vue/node_modules/isexe/index.js:42:5
gyp ERR! stack at /home/h5/my-vue/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqCallback.oncomplete (fs.js:192:21)
gyp ERR! System Linux 4.18.0-305.19.1.el8_4.x86_64
gyp ERR! command "/home/soft/nodejs/bin/node" "/home/h5/my-vue/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/up/down/122/whxmapp-vue/node_modules/node-sass
gyp ERR! node -v v14.17.5
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
2. Solution:
Update and upgrade NPM
sudo npm install npm@latest -g
error in pycallgraph setup command: use_2to3 is invalid.
Solution:
Downgrade setuptools>=58 –> <58
pip install setuptools==57.5.0
ubuntu18.04 ROS:melodic python2.7
File "/home/bionic/yuxiangROS_handeye/catkin_ws/src/handeye-calib-master/src/handeye-calib/src/handeye/handeye_calibration_backend_opencv.py", line 29, in HandeyeCalibrationBackendOpenCV
'Park': cv2.CALIB_HAND_EYE_PARK,
AttributeError: 'module' object has no attribute 'CALIB_HAND_EYE_PARK'
[base_hand_on_eye_calib-1] process has died [pid 15724, exit code 1, cmd /home/bionic/yuxiangROS_handeye/catkin_ws/src/handeye-calib-master/src/handeye-calib/src/handeye/base_hand_on_eye_calib.py __name:=base_hand_on_eye_calib __log:=/home/bionic/.ros/log/600b94f2-660e-11ec-93c4-94c691a2c1c1/base_hand_on_eye_calib-1.log].
log file: /home/bionic/.ros/log/600b94f2-660e-11ec-93c4-94c691a2c1c1/base_hand_on_eye_calib-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
It should be the opencv version
I used the Q2 command and succeeded
Q1.pip install transforms3d
Q2.python -m pip install opencv-contrib-python, and then follow @yangbenbo 's advice, this problem is done(thank you).
Q3.after the two qusetion, Q3 is normal automaticaly.I just want to test the single node to debug(rqt_easy_handeye), thanks for your advice, it works.
The librosa version used is 0.6.1.
According to the librosa documentation, inverse is only 0.8.1 version. Just upgrade librosa to a lower level.
pip install --upgrade librosa
Error message:
Exception ignored in: <function BufferedFile.__del__ at 0x1104b7d30>
Traceback (most recent call last):
File "/Users/jerrylin/.conda/envs/pythonProject/lib/python3.8/site-packages/paramiko/file.py", line 66, in __del__
File "/Users/jerrylin/.conda/envs/pythonProject/lib/python3.8/site-packages/paramiko/channel.py", line 1392, in close
File "/Users/jerrylin/.conda/envs/pythonProject/lib/python3.8/site-packages/paramiko/channel.py", line 991, in shutdown_write
File "/Users/jerrylin/.conda/envs/pythonProject/lib/python3.8/site-packages/paramiko/channel.py", line 967, in shutdown
File "/Users/jerrylin/.conda/envs/pythonProject/lib/python3.8/site-packages/paramiko/transport.py", line 1846, in _send_user_message
AttributeError: 'NoneType' object has no attribute 'time'
Program code:
import paramiko
import sys
import time
# Instantiate SSHClient
client = paramiko.SSHClient()
# Auto add policy to save server's host name and key information, if not added, then hosts no longer recorded in local know_hosts file will not be able to connect
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
# Connect to the SSH server and authenticate with username and password
client.connect()
# Open a Channel and execute commands
stdin, stdout, stderr = client.exec_command('ls data/data_target') # stdout is the correct output, stderr is the error output, and there is one variable with a value
# Print the execution result
print(stdout.read().decode('utf-8'))
# Close SSHClient
client.close()
Solution:
The reason for the error is that the output print conflicts with the close executed by the program. You only need to add a time before the close Sleep (1) is OK