我将带有 /venv 的 Django 项目(mysite)重新定位到另一台计算机。在第一台电脑上它运行良好。'dotenv' 模块安装在哪里。在 PyCharm 中,我将项目解释器设置为:Python 3.7 (mysite) C:\Users\User\mysite\venv\Scripts\python.exe但是新计算机中的“python manage.py runserver”会引发:ModuleNotFoundError: No module named 'dotenv'但在 ../mysite/venv/Scripts 中存在文件 dotenv.exe。还有 sobfolder ../venv/lib/site-packages/dotenv/ 。在 PyCharm-Settings-Project Interpreter 中的包列表中存在 python-dotenv 0.14.0好的。我尝试通过 pip 安装 dotenv,但它引发错误: C:\Users\User\mysite\mysite>pip install dotenvCollecting dotenv Using cached https://files.pythonhosted.org/packages/e2/46/3754073706e31670eed18bfa8a879305b56a471db15f20523c2427b10078/dotenv-0.0.5.tar.gz Complete output from command python setup.py egg_info: Command "python setup.py egg_info" failed with error code 1 in C:\Temp\pip-wheel-4a1x88l2\distribute\ Traceback (most recent call last): File "C:\Users\User\Anaconda3\lib\site-packages\setuptools\installer.py", line 126, in fetch_build_egg subprocess.check_call(cmd) File "C:\Users\User\Anaconda3\lib\subprocess.py", line 347, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['C:\\Users\\User\\Anaconda3\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Temp\\tmpz_ip4m3r', '--quiet', 'distribute']' returned non-zero exit status 1. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Temp\pip-install-07by3weo\dotenv\setup.py", line 23, in <module> scripts=['scripts/dotenv'] File "C:\Users\User\Anaconda3\lib\site-packages\setuptools\__init__.py", line 152, in setup _install_setup_requires(attrs) File "C:\Users\User\Anaconda3\lib\site-packages\setuptools\__init__.py", line 147, in _install_setup_requires dist.fetch_build_eggs(dist.setup_requires)我尝试这样做:pip install --upgrade setuptools但没有帮助怎么解决呢?
添加回答
举报
0/150
提交
取消