jal*_*zbe 5 python ubuntu conda
我已经使用pycharm在Windows上开发了一个项目,并且希望在ubuntu服务器上进行部署。
我正在尝试requirements.txt使用以下命令创建一个:
conda list -e > requirements.txt
conda list > requirements.txt
Run Code Online (Sandbox Code Playgroud)
根据选项,requirements.txt看起来像以下任何一种:
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: win-64
@EXPLICIT
https://repo.anaconda.com/pkgs/main/win-64/blas-1.0-mkl.tar.bz2
https://repo.anaconda.com/pkgs/main/win-64/ca-certificates-2018.03.07-0.tar.bz2
https://repo.anaconda.com/pkgs/main/win-64/icc_rt-2017.0.4-h97af966_0.tar.bz2
https://repo.anaconda.com/pkgs/main/win-64/intel-openmp-2018.0.3-0.tar.bz2
Run Code Online (Sandbox Code Playgroud)
或这个
# packages in environment at C:\ProgramData\Anaconda2\envs\myenvs:
#
# Name Version Build Channel
anyjson 0.3.3 py36h1110a06_1
arrow 0.12.1 py36_1
asn1crypto 0.24.0 py36_0
babel 2.6.0 py36_0
Run Code Online (Sandbox Code Playgroud)
或这个
name: myenv
channels:
- defaults
dependencies:
- anyjson=0.3.3=py36h1110a06_1
- arrow=0.12.1=py36_1
- asn1crypto=0.24.0=py36_0
- babel=2.6.0=py36_0
- blas=1.0=mkl
Run Code Online (Sandbox Code Playgroud)
无论我如何尝试执行此操作,在某些情况下,由于软件包是针对Windows的,我都会在ubuntu机器上出现错误:(/ win-64 /)
https://repo.anaconda.com/pkgs/main/win-64/ca-certificates-2018.03.07-0.tar.bz2
Run Code Online (Sandbox Code Playgroud)
我已经阅读了很多文档,但似乎无法获得想要的东西。 Conda(Python)虚拟环境无法从Windows移植到Linux
有什么办法吗?
小智 9
默认情况下,conda 将通过构建导出您的环境,但构建可以是特定于平台的。
对我有用的解决方案是使用--no-build标志:
$ conda env export --no-build > environment.yml
Run Code Online (Sandbox Code Playgroud)
希望这可以帮助。
| 归档时间: |
|
| 查看次数: |
1390 次 |
| 最近记录: |