前提・実現したいこと
Pycharmの新規プロジェクト作成でDjangを選択して作成したいです。
発生している問題・エラーメッセージ
選択して作成しようとすると途中でエラーが出てしまいます。
エラー内容はDjangがないのに呼ぼうとしている?みたいなのですがなぜそうなるかわかりません。
Error creating Django application: Error on python side. Exit code: 1, err: Traceback (most recent call last): File "C:\Program Files\JetBrains\apps\PyCharm-P\ch-0\191.7479.30\helpers\pycharm\_jb_django_project_creator.py", line 5, in <module> from django.core import management ModuleNotFoundError: No module named 'django' out:
また、Pure Pythonで作成するとpipがおかしいようでpipのアップデートをしようとするとエラーが出てpipが表示されなくなります。
Executed command: pip install -U pip==19.1.1 Error occurred: AttributeError: 'NoneType' object has no attribute 'bytes' Proposed solution: Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at 'C:\Users\XXX\WSL\djangogirls\myenv\Scripts\python.exe'. Command output: Collecting pip==19.1.1 Using cached https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl Installing collected packages: pip Found existing installation: pip 19.0.3 Uninstalling pip-19.0.3: Successfully uninstalled pip-19.0.3 Rolling back uninstall of pip Moving to c:\users\xxx\wsl\djangogirls\myenv\lib\site-packages\pip-19.0.3-py3.7.egg from c:\users\xxx\wsl\djangogirls\myenv\lib\site-packages\~ip-19.0.3-py3.7.egg Exception: Traceback (most recent call last): File "C:\Users\xxx\WSL\djangogirls\myenv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_internal\cli\base_command.py", line 179, in main status = self.run(options, args) File "C:\Users\xxx\WSL\djangogirls\myenv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_internal\commands\install.py", line 393, in run use_user_site=options.use_user_site, File "C:\Users\xxx\WSL\djangogirls\myenv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_internal\req\__init__.py", line 57, in install_given_reqs **kwargs File "C:\Users\xxx\WSL\djangogirls\myenv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_internal\req\req_install.py", line 913, in install use_user_site=use_user_site, pycompile=pycompile, File "C:\Users\xxx\WSL\djangogirls\myenv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_internal\req\req_install.py", line 445, in move_wheel_files warn_script_location=warn_script_location, File "C:\Users\xxx\WSL\djangogirls\myenv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_internal\wheel.py", line 544, in move_wheel_files generated.extend(maker.make(spec)) File "C:\Users\xxx\WSL\djangogirls\myenv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_vendor\distlib\scripts.py", line 405, in make self._make_script(entry, filenames, options=options) File "C:\Users\xxx\WSL\djangogirls\myenv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_vendor\distlib\scripts.py", line 309, in _make_script self._write_script(scriptnames, shebang, script, filenames, ext) File "C:\Users\xxx\WSL\djangogirls\myenv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_vendor\distlib\scripts.py", line 245, in _write_script launcher = self._get_launcher('t') File "C:\Users\xxx\WSL\djangogirls\myenv\lib\site-packages\pip-19.0.3-py3.7.egg\pip\_vendor\distlib\scripts.py", line 384, in _get_launcher result = finder(distlib_package).find(name).bytes AttributeError: 'NoneType' object has no attribute 'bytes'
これはvenvの作成自体がうまくいってないということなのでしょうか
試したこと
Pycharmの再インストールやPythonのインストーラーでRepairかけてみましたが治りませんでした。
補足情報(FW/ツールのバージョンなど)
Python:3.7.3
Windows10 Pro:1903
Pycharm professional:2019.1.3
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。