
遇到的编译错误
文章平均质量分 52
一打雪碧
这个作者很懒,什么都没留下…
展开
-
Linux使用kill -pid关闭进程显示invalid signal specification
想关闭pid为2543143的进程,结果显示。,在kill之前加上。原创 2023-03-06 10:43:37 · 4393 阅读 · 1 评论 -
使用pip命令时,报错:_sysconfigdata_x86_64_conda_cos7_linux_gnu.py
即使两个文件一模一样,但是某些程序的运行过程中会依赖于其中的一个。原因是:在当前的环境下的python中丢失了一个备份文件,即报错的文件。通常在同一个版本的python下会有两个相同的。因此要做的就是定位到哪一个文件夹缺失了文件。在linux服务器中想使用pip命令。可以其实给出了缺失文件的文件夹。之后就可以使用pip命令了。查看安装了哪些包时,报错。再在第一个图片里面找一个。,之后复制该文件夹下的。原创 2023-01-01 19:26:52 · 3891 阅读 · 2 评论 -
python安装osgeo及shapefile库、is not a supported wheel on this platform 的问题
之后在cmd终端中,使用cd,进入到自己下载gdal包的文件夹。下载的gdal包要与自己的电脑相匹配。如何知道哪一个包和自己的电脑匹配?如果下载错了,使用pip安装的时候就会显示。比如我的Compatible tags里面有一个。之后再在cmd终端中使用命令。可以直接使用pip命令安装,这里使用豆瓣源。osgeo库不可以使用pip安装,首先去。,可以查看自己电脑可以安装什么配置的包。字段,可以查看所有兼容的配置。,然后我就在gdal中下载。找到所有的gdal包,,这是我的下载路径,将。原创 2022-09-23 21:38:06 · 10869 阅读 · 9 评论 -
北大曹健老师的TensorFlow笔记中,在pycharm中安装sklearn、pandas失败,Could not find conda environment: tensorflow
点击电脑“开始”->Anaconda3->AnacondaNavigator->Environments->TF2.1右侧的三角按键->openTerminal,此时进入了创建的TF2.1环境的终端。怎么在pycharm中,运行代码时,还是报错。,其实,这是在说,这两个包,确实存在于你的电脑上,但是没有在创建的TF2.1的环境中。,你会发现,这个环境下,果然没有sklearn、pandas包。在查找问题解决方法中,遇到了这篇文章,贴出原链接,可以看一下。如果在cmd窗口中输入。输入豆瓣源的下载链接。....原创 2022-07-26 18:01:11 · 1879 阅读 · 2 评论 -
使用max、min函数必须得是相同类型的数据进行比较
在做力扣575. Distribute Candies时,出现一个错误class Solution {public: int distributeCandies(vector<int>&type) { unordered_map<int,bool> vis; int cnt=0; for(int i=0;i<type.size();i++){ if(!vis[type[i]]){原创 2021-01-31 10:47:16 · 887 阅读 · 0 评论 -
error: expected expression以及no matching function for call to ‘swap’
做力扣1694. Reformat Phone Number时,编译出错Line 18: Char 17: error: expected expressionif(k!=0&&k%3==0) ans+=’-’;原代码如下。class Solution {public: string reformatNumber(string number) { int acnt=0; for(int i=0;i<number.size(); ){原创 2021-01-22 16:11:56 · 2859 阅读 · 0 评论 -
error: C++ requires a type specifier for all declarations
在力扣1189. Maximum Number of Balloons中,遇到一个编译错误:Line 4: Char 5: error: C++ requires a type specifier for all declarationsrep[‘a’]=rep[‘b’]=rep[‘n’]=1;源代码片如下:class Solution { unordered_map<char,int> rep,cnt;public: rep['a']=rep['b']=rep['原创 2021-01-19 22:58:14 · 18430 阅读 · 0 评论 -
reference to non-static member function must be called
reference to non-static member function must be called今天在LeetCode上做贪心题目时,遇到一个编译错误。error: reference to non-static member function must be calledsort(g.begin(),g.end(),cmp);原题是455. Assign Cookies原题链接Assume you are an awesome parent and want to give y原创 2021-01-17 12:51:05 · 7111 阅读 · 0 评论