search

Home  >  Q&A  >  body text

python - django项目requriments.txt依赖包

PHPzPHPz2892 days ago656

reply all(2)I'll reply

  • 黄舟

    黄舟2017-04-18 09:27:17

    Yesterday when I migrated my personal blog, I used pyvenv (similar to virtuallenv). Problems occurred when installing dependencies such as Mysql-python, lxml, etc. because it was installed using pip. For installation packages that cause problems, I personally recommend going to this website to download compiled extensions, such as mysql-python (mysqlclient implements all interfaces for operating databases), we can directly download the mysqlclient.whl file, Then install it in the virtual environment. The installation method is: Activate the virtual environment->Install the wheel extension through pip (the purpose is to install the .whl file)->Install the .whl file through pip. Mysql-python can be installed in this way, and other extension libraries that fail to be installed through requirements.txt can also be installed in this way.

    PS: If the topic is still unclear, you can take a look at the blog post I wrote. The steps are more detailed: Using pyvenv for project isolation on Windows

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 09:27:17

    The dependency packages of the django project are installed in the same way as ordinary dependency packages. It’s just that things like MySQL rely on other non-Python packages in the system, which will cause various problems

    reply
    0
  • Cancelreply