Issue
i have all required python module libraries for my standalone software in my main laptop.But if i run my software in another laptop,it is getting errors.Do i have to reinstall those python modules(eg.PySide2,PyQt)?Or should i copy or install modules into my software folder using this command?
pip install --target=d:\somewhere\other\than\the\default package_name
you know what i mean?i dont see any solution for this kind of post.So is this question weird or how do software developer do this?
Solution
In order to work in more than one laptop, I would recommend working in a virtual environment. This will allow you to install all the dependencies at once.
- First, you should create the virtual environment
- Then, in order to get all the libraries in your pc, use
pip freeze
. When you have them, create a requirements.txt in the root folder and include them in there. - When you activate the virtual environment and gotten inside of it, use the command
pip install -r requirements.txt
in order to install the libraries that you were using in the other pc.
Answered By - Félix Jiménez González
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.