Python Forum
Configuring interpretor in PyCharm: [Errno 2] No such file or directory
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Configuring interpretor in PyCharm: [Errno 2] No such file or directory
#1
I created a new virtual environment for my project in python3.6.4 so can start using that instead of the previous version python3.5. However, today I opened my PyCharm IDE and found that it doesn't recognize tkinter anymore:
Error:
File "/usr/lib/python3.5/tkinter/__init__.py", line 38, in <module> raise ImportError(str(msg) + ', please install the python3-tk package') ImportError: No module named '_tkinter', please install the python3-tk package
I realized that the reason for this is most likely because the python interpreter isn't located at the right source, so I went to take a look in settings and saw that the interpreter is from the virtualenv environment and was of course from /usr/lib/python3.5, which it took from a source that is excluded by PyCharm and isn't even part of the virtual environment. To fix this I tried to configure it to use the Conda environment, which uses python3.6.4 and was the option below Virtualenv Environment. After choosing its executable from /virtualenv/bin and pressed ok, it gave me a "failed to create interpreter" dialogue with the following error:
Error:
/home/user/Python-Projekte/python3-projekte/virtualenv/bin/python3.6: can't open file 'create': [Errno 2] No such file or directory
Then I thought it might be the location that's not configured properly so I went on to fix that (it used to be /home/user/.conda/envs/Python-Projekte), however,my configuration wasn't recognized. Does anyone know why this happens and how to fix this?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Error (Errno 2), File upload with the Flask framework and a public IP Username_Python1 0 274 Mar-28-2024, 01:46 PM
Last Post: Username_Python1
  Using pyinstaller with .ui GUI files - No such file or directory error diver999 3 3,379 Jun-27-2023, 01:17 PM
Last Post: diver999
  Extract file only (without a directory it is in) from ZIPIP tester_V 1 1,003 Jan-23-2023, 04:56 AM
Last Post: deanhystad
Thumbs Up Need to compare the Excel file name with a directory text file. veeran1991 1 1,130 Dec-15-2022, 04:32 PM
Last Post: Larz60+
  no such file or directory in SFTP saisankalpj 2 1,558 Nov-25-2022, 11:07 AM
Last Post: DeaD_EyE
Photo Making Zip file of a file and Directory Nasir 2 1,035 Oct-07-2022, 02:01 PM
Last Post: Nasir
  Failed to execute child process (No such file or directory) uriel 1 1,665 Sep-15-2022, 03:48 PM
Last Post: Gribouillis
  Need Help: FileNotFoundError:[Errno 2] No such file or directory python202209 5 2,662 Sep-12-2022, 04:50 AM
Last Post: python202209
  importing functions from a separate python file in a separate directory Scordomaniac 3 1,383 May-17-2022, 07:49 AM
Last Post: Pedroski55
  How to read python shortcut target profile directory of Chrome Ink file sunny9495 1 1,669 Apr-12-2022, 06:12 PM
Last Post: sunny9495

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020