Answer the question
In order to leave comments, you need to log in
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
Virtual environments are not designed to be portable. Export the list of dependencies with pip freeze
to the requirements.txt file, and then install them in a new virtual environment withpip install -r requirements.txt
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 environmentpip install -r requirements.txt.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question