Tag Archives: ubuntu

Mmdet error modulenotfounderror: no module named ‘mmcv_ ext‘

problem : when installing MMMCV, ModuleNotFoundError: No module named ‘MMCV._ext’ problem often occurs.
environment : ubuntu16.04+Anaconda3+python3.7.7+cuda10.0+cuDNN7.6.4.3

solution : do not use :

when installing

pip install mmcv

use:

pip install mmcv-full

use the MMCV version that is appropriate for your environment if you have weird problems, such as

pip install mmcv-full==latest+torch1.5.0+cu101 -f https://openmmlab.oss-accelerate.aliyuncs.com/mmcv/dist/index.html

can be viewed on MMCV’s github description, as follows:

https://github.com/open-mmlab/mmcv

more questions on the official github.

Mex compiler error handling in MATLAB and GCC installation in Ubuntu

I, MATLAB use mex error and GCC installation of a variety of problems to solve.

when I run my program, I notice that the “model” in the image below has not defne. (undefined)

access to a number of data, walk a lot of detours, only to find that the original is tex-mex file not compile.
then, compile tex-mex file, enter: tex-mex – setup
found an error again: “No supported compiler or the SDK was found.”

open baidu began to browse a variety of, dazzling methods… In fact, you only need to download the supported compiler or SDK.

is here, and since I’m ubuntu’s matlab for Linux, all I need to do is install GCC.

the steps are as follows:

sudo apt-get build-dep GCC

sudo apt-get  build-dep  gcc  

after the above method is used, the following situation occurs:

Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

enter the command:

sudo rm /var/lib/dpkg/lock
sudo dpkg --configure -a

when you run the initial command, the following situation occurs:

Unable to locate package
execute:

sudo apt-get update

start installation… Error:

, possibly due to network or other conflicts

ubuntu apt-get (You must put some ‘source’ URIs in your sources. List)
E: You must put some ‘source’ URIs in your sources. List

solution:

sudo vi /etc/apt/sources.list

open an editor and type:
copy code

deb-src http://archive.ubuntu.com/ubuntu trusty main restricted #Added by software-properties
deb-src http://gb.archive.ubuntu.com/ubuntu/ trusty restricted main universe multiverse #Added by software-properties
deb-src http://gb.archive.ubuntu.com/ubuntu/ trusty-updates restricted main universe multiverse #Added by software-properties
deb-src http://gb.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse #Added by software-properties
deb-src http://security.ubuntu.com/ubuntu trusty-security restricted main universe multiverse #Added by software-properties
deb-src http://gb.archive.ubuntu.com/ubuntu/ trusty-proposed restricted main universe multiverse #Added by software-properties

copy code
press Esc, enter: wq, then enter the command:

sudo apt-get update

: “E45: ‘readonly’ option is set (add! To override)

this is authority, set file into read-only permissions, as is known to all, read-only files need to be performed prior to such modification sudo, but have changed, how to enforce save?Geeks tell you! Just save and execute the following command:

:wq! The above command is to force save exit, and then you can!

try again to run sudo apt-get build-dep GCC, again failed.

method 2: enter the command: sudo apt-get install build-essential

sudo apt-get  install  build-essential

start installation, successful.

Windows of matlab in tex-mex compilation fails, go to https://ww2.mathworks.cn/support/requirements/supported-compilers.html directly download the corresponding matlab version of MinGW C/C + + 6.3.

Finally, enter MTALAB and enter met-setup


choose first.
raises a problem to be solved: train a decision tree, use the random forest classifier to extract the features of the input image, and output the frequency image??

Python automatically generates the requirements file for the current project

python automatically generates the requirements file for the current project

there are several ways:

1. Use PIP freeze

< pre style=”margin: 0px 0px 15px; padding: 0px; font-family: “Courier New” ! important; font-size: 12px ! important; The line – height: 1.72222; color: inherit; white-space: pre; border-radius: 6px; overflow-wrap: break-word;” > pip freeze > requirements.txt< /pre>

this way is to list the packages in the entire environment, if it is a virtual environment. In general, we only need to export the current project’s requirement.txt, and pipreqs

is recommended
2. Use pipreqs

is a helpful tool that scans the project directory to automatically discover which libraries are used, automatically generates dependency listings, and only generates project-related dependencies to requirements. TXT

installation

< pre style=”margin: 0px 0px 15px; padding: 0px; font-family: “Courier New” ! important; font-size: 12px ! important; The line – height: 1.72222; color: inherit; white-space: pre; border-radius: 6px; overflow-wrap: break-word;” > pip install pipreqs< /pre>

Use

also easy to use pipreqs pathname
here goes directly to the project root directory, so it is./
error

File "c:\users\devtao\appdata\local\programs\python\python36-32\lib\site-packages\pipreqs\pipreqs.py", line 341, in init
    extra_ignore_dirs=extra_ignore_dirs)

  File "c:\users\devtao\appdata\local\programs\python\python36-32\lib\site-packages\pipreqs\pipreqs.py", line 75, in get_all_imports
    contents = f.read()

UnicodeDecodeError: 'gbk' codec can't decode byte 0xa6 in position 186: illegal multibyte sequence

UnicodeDecodeError: ‘GBK’ codec can’t decode byte 0xa6 in position 186: illegal multibyte sequence
directly modify line 407 of pipreqs.py, change encoding to utf-8, save, and run on pipreqs./
pipreqs.py path

C:\Users\linxiao\AppData\Local\Programs\Python\Python37\Lib\site-packages\pipreqs