Linux服务器(我用的是redhat6.6因为现场是这个环境)利用anaconda搭建python3环境 利用pycharm进行远程连接调试 多台服务器进行移植克隆(无外网连接的服务器)

目标:在现场无外网的服务器上安装python3.6:

1、运行程序所需的一些package。例如:pandas、numpy、gensim、joblib、scikit-learn等

2、用pycharm中的SSH Interpreter功能进行远程连接,代码调试(主要是为了使用服务器上的数据,毕竟服务器上的数据是不会随便让你拿出来分析的,所以才这样大费周章。)

 第一步:在我自己的电脑上安装redhat6.6虚拟机,进行测试(做好测试再去现场干活稳一点)

1、因为是在我自己的电脑上做测试,所以我将服务器通过桥接的方式连接了外网,方便下载一些东西。

第二步:下载anaconda到服务器上

1、如果你的测试服务器没有连接网络,可以去网站下载,然后通过ftp上传到服务器(最好是连外网,方便后面的package下载)

2、通过命令直接下载:(1) mkdir anaconda

                                      (2)wget https://repo.continuum.io/archive/Anaconda3-5.2.0-Linux-x86_64.sh

3、你可以先去anaconda官网查看一下最新版本:注意anaconda有三种版本,windows、max、linux,找到最近版本修改一下编号就可以了,我搭建的时候最新版本就是3-5.2.0

4、下载过程中可能会中断,最好挑晚上公司没人的时候下载,比较快。因为anaconda内置了很多package,所以比较大有621M

第三步:安装anaconda,安装成功会生成

(venv) E:\pycharm\study\dorm_face_recognition\model_training>pip install dlib Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting dlib Downloading https://pypi.tuna.tsinghua.edu.cn/packages/28/f4/f8949b18ec1df2ef05fc2ea1d1dd82ff2d050b8704b7d0d088017315c221/dlib-20.0.0.tar.gz (3.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 6.6 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: dlib Building wheel for dlib (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for dlib (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [48 lines of output] running bdist_wheel running build running build_ext Traceback (most recent call last): File "E:\python3.9.13\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "E:\python3.9.13\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "E:\pycharm\study\venv\Scripts\cmake.exe\__main__.py", line 4, in <module> ModuleNotFoundError: No module named &#39;cmake&#39; ================================================================================ ================================================================================ ================================================================================ CMake is not installed on your system! Or it is possible some broken copy of cmake is installed on your system. It is unfortunately very common for python package managers to include broken copies of cmake. So if the error above this refers to some file path to a cmake file inside a python or anaconda or miniconda path then you should delete that broken copy of cmake from your computer. Instead, please get an official copy of cmake from one of these known good sources of an official cmake: - cmake.org (this is how windows users should get cmake) - apt install cmake (for Ubuntu or Debian based systems) - yum install cmake (for Redhat or CenOS based systems) On a linux machine you can run `which cmake` to see what cmake you are actually using. If it tells you it&#39;s some cmake from any kind of python packager delete it and install an official cmake. More generally, cmake is not installed if when you open a terminal window and type cmake --version you get an error. So you can use that as a very basic test to see if you have cmake installed. That is, if cmake --version doesn&#39;t run from the same terminal window from which you are reading this error message, then you have not installed cmake. Windows users should take note that they need to tell the cmake installer to add cmake to their PATH. Since you can&#39;t run commands that are not in your PATH. This is how the PATH works on Linux as well, but failing to add cmake to the PATH is a particularly common problem on windows and rarely a problem on Linux. ================================================================================ ================================================================================ ================================================================================ [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for dlib Failed to build dlib ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based projects
最新发布
06-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值