简体   繁体   English

如何在跨平台上使用pycharm venv(在Linux-Windows等。)?

[英]How to use pycharm venv at cross-platform (at linux - windows etc..)?

I have created a virtual environment in pycharm on windows. 我在Windows上的pycharm中创建了一个虚拟环境。

I've cloned the project to a linux machine running Ubuntu 18.04 and tried creating a venv with same name at linux (I overwrote it with virtualenv venv ) but I had to install requirements again. 我已将该项目克隆到运行Ubuntu 18.04的linux机器上,并尝试在linux上创建一个具有相同名称的venv(我用virtualenv venv覆盖了它),但是我不得不再次安装需求。

Is there an any way run this existing venv to linux? 有什么办法可以将现有的 venv运行到linux吗?

There is no way to do this simply because windows executables will not run on linux, just make sure you have a requirements.txt file. 仅仅因为Windows可执行文件将无法在linux上运行,就没有办法做到这一点,只需确保您具有requirements.txt文件即可。 Additionally, you'll run into other problems where venv bin scripts have improper #! 此外,您还会遇到venv bin脚本使用不正确的#!其他问题#! lines if copy the venv. 行如果复制venv。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM