我通过手机在ubuntu中使用带有LAN连接的expo应用程序,直到昨天它都运行良好。
但是今天,我在相同的环境中尝试像昨天一样启动纱线,但出现如下图所示的错误。LAN和本地不能像下面那样工作,而隧道可以工作,但是当我尝试使用 django 在同一台计算机上向服务器发出请求时,服务器没有来自我手机的请求。
我在互联网上看到了同样的问题和解决方案,但对我来说没有任何作用。对于这种情况,您有什么解决方案或技巧吗?
我刚刚重新安装了 Ubuntu 16.04,然后创建了一个 virtualenv 并尝试安装 Django
sudo pip3 install django==3.0
Run Code Online (Sandbox Code Playgroud)
但这产生了以下错误:
ERROR: Could not find a version that satisfies the requirement django==3.0
(from versions: 1.1.3, 1.1.4, 1.2, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5,
1.2.6, 1.2.7, 1.3, 1.3.1, 1.3.2, 1.3.3, ... 2.2.5, 2.2.6, 2.2.7, 2.2.8, 2.2.9)
ERROR: No matching distribution found for django==3.0
Run Code Online (Sandbox Code Playgroud)
经过搜索,我觉得我的pip
版本太低了,所以它不知道Django的新版本。我试图升级pip
与
sudo pip install --upgrade pip
Run Code Online (Sandbox Code Playgroud)
但这给了
WARNING: The directory '/home/hugh/.cache/pip' or
its parent directory is not owned or is not writable by the current …
Run Code Online (Sandbox Code Playgroud)