H
H
Hadmi2019-06-30 14:09:43
PyCharm
Hadmi, 2019-06-30 14:09:43

Using virtualenv in different OS, how to organize?

Good afternoon.
I have several django projects using the pyCharm IDE. Initially, I programmed under ubuntu, my server is also on ubuntu, and everything was great. But due to the fact that from time to time there is a need to use windows, and it is not convenient to keep two systems, I decided to try to transfer the development process to it.
For a long time I could not understand why pyCharm under windows cannot import the virtual environment from my projects. Then I read that the Wirth environment in win and linux is different and you cannot use an environment created in another OS.
Actually a question - how to be? If I want to program under win and the result should work under ubuntu?
What is the best way to transfer my projects to a windows environment and still leave server copies in a linux environment?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Gornostaev, 2019-06-30
@hadmi

Virtual environments are not designed to be portable. Export the list of dependencies with pip freezeto the requirements.txt file, and then install them in a new virtual environment withpip install -r requirements.txt

L
latush, 2019-06-30
@latush

The most correct thing is to develop on the same one on which it will be operated.
But, if you really want to, then on the original environment
a, after entering the new environment
pip install -r requirements.txt.

R
Robert Bl, 2017-09-06
@JackShcherbakov

Element one. And you get two 'click' handlers attached to the same element

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question