<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[吉凯]关于项目环境搭建]]></title><description><![CDATA[<p dir="auto"><a href="http://an.forum.genostack.com/topic/952/%E5%90%89%E5%87%AF-%E5%85%B3%E4%BA%8E%E6%A8%A1%E6%9D%BF%E9%A1%B9%E7%9B%AE%E7%9A%84%E8%AF%B4%E6%98%8E">返回</a></p>
<h1>项目环境搭建</h1>
<h2>1. 创建 conda 环境</h2>
<p dir="auto">推荐使用 <code>conda</code> 进行环境的隔离,安装时使用mamba安装 速度比较快</p>
<pre><code class="language-bash">
ENV_NAME="设置对应项目的环境名称" # 建议项目名和环境名相同

# 统一使用py3.10版本，可以根据项目的不同使用其他的版本，
# 这里展示大部分项目环境的初始化过程，仅供参考
mamba create -n ${ENV_NAME} python=3.10 -y 
mamba activate ${ENV_NAME}
mamba install r-base=4.3 nodejs=18 -y
# r-base 4.3.0, nodejs 18.16.1
# 没有R的依赖可不安装r-base;  nodejs用于前端项目, 全局安装 nodejs 时此处可不安装
</code></pre>
<h2>2. 安装前端依赖</h2>
<pre><code class="language-bash"># 前端需要的全局依赖 vue 脚手架(5.0.8版本)
# 这里我安装到对应项目目录下，可根据情况全局安装（增加 -g 参数）
npm i @vue/cli -g 

# 安装前端项目依赖
npm i

# 后台使用的是打包后的文件
npm run build
</code></pre>
<h2>3. 安装后端依赖</h2>
<pre><code># 安装必要的全局依赖
pip install -r docs/docker_base_v01/requirements.txt

# 根据项目使用包的情况安装必要依赖
conda install r-xxx -c conda-forge -y
pip install -r requirements.txt

# 安装公共sdk工具包,安装指定版本
pip install ms-jk-utils=x.x.x
</code></pre>
<h1>问题记录</h1>
<h2>1. 如果遇到 notarget No matching version found for @babel/parser@^7.22.7. 错误</h2>
<p dir="auto">检查 nodejs <code>&gt;16.20</code> ，npm <code>&gt;9.6.6</code> , vue <code>5.0.8</code> 版本，<br />
检查 镜像地址是否修改为 私服镜像 <code>npm config set registry=http://registry.npmjs.org</code></p>
]]></description><link>http://an.forum.genostack.com/topic/957/吉凯-关于项目环境搭建</link><generator>RSS for Node</generator><lastBuildDate>Sat, 13 Jun 2026 12:35:00 GMT</lastBuildDate><atom:link href="http://an.forum.genostack.com/topic/957.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 07 Jul 2023 03:34:27 GMT</pubDate><ttl>60</ttl></channel></rss>