I try to set up project interpteter Python 3.5 in Pycharm and get an SDK error?
Any solution to fix it?
I try to set up project interpteter Python 3.5 in Pycharm and get an SDK error?
Any solution to fix it?
did you move the whole project after you open it with pycharm?
if so, just remove the .idea/* (run rm -r .idea
under you project)
This problem is caused by: pycharm will create a .idea file under the project after the first time you import the project. SO the path in there will remain the old one after you moved the project. Thus the pycharm will keep trying to import 'old_path/venv/bin/activate' which is kept in .idea/*
I had such problem. The solution was pretty easy. I created an account in russian in Windows, and you could emphasize that the error message (the big one) then contains the word about encoding is used. Therefore check your Windows account name - change it if it's not in english and contains spaces and other unwanted signs. Thanks.
I just had this error and got around it, and long-story-short I think it may have had to do with my PATH / PY_HOME / PYTHONPATH environment variables pointing to a different version of Python. Here's what I did:
Background:
Solution:
I got the same problem on windows 10, and got the solution.
Root cause: - Python cannot be launched due to no python27.dll.
Solution: - Install python or put python27.dll in PATH
Thanks.
In my case, python.exe that I had in my venv was the problem.
Thus, I downloaded a specific version of Python and pasted contests of its Script folder to my \venv\Scripts folder.
A fix for this issue, is tell to the global var named-> LD_LIBRARY_PATH to include the new python libraries compiled. Let's assume that you have just download python, extracted it & installed; assume that you have downloaded the 3.6.4 version
For include the library, you have to edit your .bashrc file. (This file is quite interesting, have a look ;) ). This file is an "hidden file" placed in your home:
nano ~/.bashrc
is a quite easy text editor.
Go at the end of the file and append this command, replacing your path of new python
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/whoami
/Downloads/Python-3.6.4
CTRL+X for save file.
For load the new file:
source ~/.bashrc
Operating system: Windows 10 / cygwin
Desired Python: 2.7.14
Error: "SDK seems invalid"
My fix:
note: I guess it works since the errors I see are python generated eg "Traceback (most recent call last): File ..."
I just ran into the same problem with Python 3.6 (which I wanted to use) and Python 3.7 also installed in my computer. My solution was just to remove reference to Python 3.7 from System PATH.
So my PATH is currently set:
C:\Program Files\Python36\Scripts\
C:\Program Files\Python36\
That's all, hope it helps.
I had the same issue. I suspect it occurred whilst i was doing a python project, I was trying to make tensorflow run on my GPU, messing with settings I didn't and still dont really understand (in the terminal with path variables)
The issue in my case was with my system interpreter. I fixed it by going to the interpreter section in Pycharm and creating a choosing a new interpreter. I edited the "Path" environment\system variables from "...\python.exe\Scripts" to "...\python.exe"
In my case (on a Windows os), the problem was due to the fact that I added a PYTHONHOME environment variable in an unrelated test of Apache2.4 + Flask: That "broke" the set up virtual environments using Conda. I started to get the "invalid SDK" error described above when I created a virtual environment which needed a version of Python different from the one indicated in PYTHONHOME (in my case, I needed a virtual environment running Python 3.6, while PYTHONHOME pointed to 3.8 version).
Solution: I simply needed to remove the PYTHONHOME environment variable!
This work for me:
My environment created with python 3.9.1 but I install python 3.8 when I uninstall python 3.8 then restart and install python 3.9.1 version that set up in Pycharm
correctly.
Note: After uninstall its important restart OS then after restart install python version compatible with environment created .
For me, the problem was that part of the path of the project was in Hebrew, so when I changed it to English the problem was solved :)
PyCharm picks up random files of format ~/.asdfqwer/python
as the Python executable or environment
On Ubuntu 19.04 pycharm-community
2019.2.3 installed with the snap
, PyCharm for some weird reason picks up anything with the form:
~/.asdfqwer/python
up as a virtualenv Python interpreter and uses that as the default.
In my particular case, I had a file called:
~/.gdbinit.d/python
for my GDB Dashboard, which is not at all a python interpreter or virtualenv, just a python
GDB config as opposed to a .gdb
config.
To solve it, I just had to set the correct interpreter at:
<project-name>
-
+