Can't set up a virtual enironment

I am trying to use PyCharm Professional 2019.3.1. When I try and set the interpreter for a project to a virtual environment, I get the following error:

Error configuring SDK: Accessing invalid virtual file: file:///homes/mlghomes/jg801/.local/share/JetBrains/Toolbox/apps/PyCharm-P/ch-0/193.5662.61/plugins/python/helpers/typeshed; original:257811; found:-; File.exists()=true.
Please make sure that /homes/jg801/ConvNPs/npenv/bin/python is a valid home path for this SDK type.

I'm on Ubuntu. Here are some snapshots of the process:

When I open the Project Interpreter screen, the only existing environment is the basic Python 2.7 one.

 

I try to add a local Python 3.7 virtual environment that I created fresh for this project.

And I get the following error, which I have been unable to get around.

This happens when I try to use environments that I have used successfully for past projects, or when I try and let PyCharm create a new environment for the project, as shown below:

I have tried uninstalling and reinstalling PyCharm, but this is not fixing the issue.

5 comments
Comment actions Permalink

Do you use by any chance for your project files:

- Network folders/file systems? 

- Symlinks?

Please reproduce the issue and provide logs (https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files) so we could investigate. You can upload the logs to [FTP](https://uploads.services.jetbrains.com/) and post the file name here.

0
Comment actions Permalink

I have the same issue and yes I am using symlinks - why is that significant?

I have uploaded logs

pycharm-logs-20200428-070229.zip
Thanks
0
Comment actions Permalink

I am getting the same error. Any update on this?

0
Comment actions Permalink

Daniel Renshaw

If you can successfully create a virtualenv in the system terminal using the same interpreter as a base, please file an issue to https://youtrack.jetbrains.com/issues/PY

0
Comment actions Permalink

Yes, I can successfully create a virtualenv in the system terminal using the same interpreter as a base. However I found a workaround: delete all the configured Python interpreters. Disable the PyCharm plugin. Restart CLion. Enable the PyCharm plugin. Restart CLion. Add a _system_ interpreter. Add the interpreter I actually want to use.

0

Please sign in to leave a comment.