全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 650|回复: 7

[Windows VPS] 请问有会python的大佬吗?请教一个python环境的问题

[复制链接]
发表于 2021-10-4 09:20:16 | 显示全部楼层 |阅读模式
本帖最后由 dengwen168 于 2021-10-4 12:37 编辑

以前都是用vitual env管理虚拟环境。

项目完成后,直接生成requirements.txt,项目需要的包全都在里面,到了其他电脑上,再安装一次这些包就可以了。

最近拿到了一个别人写的项目,用的是pipenv,

我想在本地电脑上跑起来看看效果,

可是拿到的这个项目里面没有requirements.txt,这项目怎么跑?

我从没用过pipenv,项目文件如图所示:


哪位大佬指教一下?谢谢。


更新一下:

在github上找到另一个人的,里面有安装的包的列表,终于将项目跑起来了。
不过首页的css文件没发生作用,、
还是没有搞定。。。


发表于 2021-10-4 09:27:51 | 显示全部楼层
照样运行啊,缺少什么装什么就是了
发表于 2021-10-4 09:41:09 | 显示全部楼层
直接跑啊  提示缺啥装就是了
发表于 2021-10-4 09:43:32 | 显示全部楼层
楼上说的对,或者你直接进代码里面看import了什么也行
cherbim 该用户已被删除
发表于 2021-10-4 09:44:23 来自手机 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2021-10-4 09:46:53 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2021-10-4 09:47:18 来自手机 | 显示全部楼层
装个 pipreqs,自己生成一个 requirements.txt
 楼主| 发表于 2021-10-4 12:36:23 | 显示全部楼层
你们说一个一个包装的,没遇到过安装包版本不对的情况么?
这时会折腾死你。。

看看这个项目用的包,一个个来装也会搞死人。。

Werkzeug==1.0.1 # https://github.com/pallets/werkzeug
ipdb==0.13.4  # https://github.com/gotcha/ipdb
psycopg2-binary==2.8.6  # https://github.com/psycopg/psycopg2
watchgod==0.6  # https://github.com/samuelcolvin/watchgod

# Testing
# ------------------------------------------------------------------------------
mypy==0.790  # https://github.com/python/mypy
django-stubs==1.7.0  # https://github.com/typeddjango/django-stubs
pytest==6.1.2  # https://github.com/pytest-dev/pytest
pytest-sugar==0.9.4  # https://github.com/Frozenball/pytest-sugar

# Documentation
# ------------------------------------------------------------------------------
sphinx==3.3.0  # https://github.com/sphinx-doc/sphinx
sphinx-autobuild==2020.9.1 # https://github.com/GaretJax/sphinx-autobuild

# Code quality
# ------------------------------------------------------------------------------
flake8==3.8.4  # https://github.com/PyCQA/flake8
flake8-isort==4.0.0  # https://github.com/gforcada/flake8-isort
coverage==5.3  # https://github.com/nedbat/coveragepy
black==20.8b1  # https://github.com/ambv/black
pylint-django==2.3.0  # https://github.com/PyCQA/pylint-django
pylint-celery==0.3  # https://github.com/PyCQA/pylint-celery
pre-commit==2.8.2  # https://github.com/pre-commit/pre-commit

# Django
# ------------------------------------------------------------------------------
factory-boy==3.0.1  # https://github.com/FactoryBoy/factory_boy

django-debug-toolbar==3.1.1  # https://github.com/jazzband/django-debug-toolbar
django-extensions==3.0.9  # https://github.com/django-extensions/django-extensions
django-coverage-plugin==1.8.0  # https://github.com/nedbat/django_coverage_plugin
pytest-django==4.1.0  # https://github.com/pytest-dev/pytest-django

pytz==2020.4  # https://github.com/stub42/pytz
python-slugify==4.0.1  # https://github.com/un33k/python-slugify
Pillow==8.0.1  # https://github.com/python-pillow/Pillow
rcssmin==1.0.6  # https://github.com/ndparker/rcssmin
argon2-cffi==20.1.0  # https://github.com/hynek/argon2_cffi
redis==3.5.3  # https://github.com/andymccurdy/redis-py
hiredis==1.1.0  # https://github.com/redis/hiredis-py
celery==5.0.2  # pyup: < 5.0,!=4.4.7  # https://github.com/celery/celery
django-celery-beat==2.1.0  # https://github.com/celery/django-celery-beat
uvicorn==0.12.2  # https://github.com/encode/uvicorn
wsproto==0.15.0  # https://github.com/python-hyper/wsproto/
mysqlclient==2.0.1

# Django
# ------------------------------------------------------------------------------
django==3.1.3  # pyup: < 3.1  # https://www.djangoproject.com/
django-environ==0.4.5  # https://github.com/joke2k/django-environ
django-model-utils==4.0.0  # https://github.com/jazzband/django-model-utils
django-allauth==0.43.0  # https://github.com/pennersr/django-allauth
django-crispy-forms==1.9.2  # https://github.com/django-crispy-forms/django-crispy-forms
django-compressor==2.4  # https://github.com/django-compressor/django-compressor
django-redis==4.12.1  # https://github.com/jazzband/django-redis
# Django REST Framework
djangorestframework==3.12.1  # https://github.com/encode/django-rest-framework
django-cors-headers==3.5.0 # https://github.com/adamchainz/django-cors-headers

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-4-26 18:39 , Processed in 0.066911 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表