小编Mut*_*mar的帖子

pip 安装 ssh-import-id 时没有名为“requests”的模块

我使用 Heroku 作为开发服务器。当我尝试将 Django 应用程序推送到 Heroku 时,它首先尝试从文件安装我的包requirements.txt

requests==2.18.3
ssh-import-id==5.5
Run Code Online (Sandbox Code Playgroud)

问题是我对我的一个包与其他包有依赖关系。在上面的包中,ssh-import-id需要的requests包已经安装。因此,当我推送应用程序时,pip 无法安装并停止部署。

Collecting requests==2.18.3 (from -r re.txt (line 1))
Using cached https://files.pythonhosted.org/packages/ba/92/c35ed010e8f96781f08dfa6d9a6a19445a175a9304aceedece77cd48b68f/requests-2.18.3-py2.py3-none-any.whl
Collecting ssh-import-id==5.5 (from -r re.txt (line 2))
Using cached https://files.pythonhosted.org/packages/66/cc/0a8662a2d2a781db546944f3820b9a3a1a664a47c000577b7fb4db2dfbf8/ssh-import-id-5.5.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-go0a5mxf/ssh-import-id/setup.py", line 20, in <module>
    from ssh_import_id import __version__
  File "/tmp/pip-install-go0a5mxf/ssh-import-id/ssh_import_id/__init__.py", line 25, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'

----------------------------------------
Command …
Run Code Online (Sandbox Code Playgroud)

python pip heroku

5
推荐指数
1
解决办法
1197
查看次数

Heroku 中的 Django Redis 连接错误:写入套接字时出现错误 110。连接超时

我在 Heroku 上托管的 Django 项目中使用 Redis 进行缓存。

在 Redis 连接期间,我随机收到以下错误消息

写入套接字时出现错误 110。连接超时。

我正在使用以下版本的软件包

  • python-3.6.8
  • Django-2.2.2
  • redis-3.2.1
  • 芹菜-4.3.0

另外,我使用worker(有时是celery)访问Redis。

有人可以建议我摆脱这个问题或任何其他对策来解决这个问题。

提前致谢...

python django heroku redis celery

5
推荐指数
1
解决办法
3462
查看次数

自动将水平滚动条移动到 div 中的右端

我有一个具有超过 24 列的固定标题表格式的 div。

该表包含按升序排列的列,并具有水平和垂直滚动条。

所以我需要在加载过程中将 div 的水平滚动条移动到右端。我在前端使用 angular 7。

我曾尝试使用 javascriptscrollIntoView但它不起作用。

任何人都建议我使用 angular 或 javascript 而不是 jquery 来实现这一点。

html javascript angular

4
推荐指数
1
解决办法
2395
查看次数

Pandas read_excel - 返回具有公式的单元格的 nan

我有一个 Excel 文件,其中包含会计数据以及某些单元格的文件使用公式。当我使用 pandas read_excel 读取文件中的值时,它返回nan具有公式的单元格的值。我也使用过 openpyxl,但仍然遇到同样的问题。

有什么方法可以读取具有公式的单元格的值而不是公式。

我还附上了使用的 xlsx 文件。

https://drive.google.com/file/d/1aOTYwtKTrqyjF16vDizzzvMkUsvdgRe1/view?usp=sharing

谢谢...

python pandas

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

python ×3

heroku ×2

angular ×1

celery ×1

django ×1

html ×1

javascript ×1

pandas ×1

pip ×1

redis ×1