Choosing Python installation

Hi, 

I am trying to use Upsource for our python project. I bumped into two issues:

  • Upsource apparently choose a Python 3.5 installation (out of 3.4, 3.5 and 3.6), which is even not default in my environment. Can I force it to use `/usr/bin/python3.6` instead?
  • It says that some requirements are not satisfied. Would not it be best to create an venv for each Python project and install the appropriate requirements as needed? I would have a terrible problems if I had a two projects using two different version of the same library in the current setup.

Otherwise a great job. I love using Upsource for Java projects.

 

3 comments
Comment actions Permalink

Hi Vojtech,

Thank you for your feedback.

Upsource should take the latest available Python version. Why it takes 3.5 is a good question. Could you please Upsource logs for the following record:

```

Installing python SDK

```

What version is specified there?

 

As for Venv- it's a really cool suggestion, but for now, we don't do that.

0
Comment actions Permalink

According to the logs it first installed the python from 3.5... But then! I compiled the latest python manually to solve some pip related problems! See this grep:

upsource$ grep -nr ' - Installing python SDK' upsource-frontend
upsource-frontend/./all.log.2:49059:[2017-02-09 11:31:38,152] INFO PsiIndexerQueue #3 awesome-censored-project languages.impl.PythonSdkLoader - Installing python SDK "3.6" from /usr/bin/python3.6
upsource-frontend/./all.log.2:49915:[2017-02-09 12:58:58,452] INFO PsiIndexerQueue #2 awesome-censored-project languages.impl.PythonSdkLoader - Installing python SDK "3.6" from /usr/bin/python3.6
upsource-frontend/./all.log.2:50724:[2017-02-09 14:21:14,012] INFO PsiIndexerQueue #1 awesome-censored-project languages.impl.PythonSdkLoader - Installing python SDK "3.5" from /usr/bin/python3.5
upsource-frontend/./all.log.1:8365:[2017-02-10 17:23:26,634] INFO PsiIndexerQueue #1 awesome-censored-project languages.impl.PythonSdkLoader - Installing python SDK "3.5" from /usr/bin/python3.5

Since then the python3.6 is located in 

upsource$ which python3.6
/usr/local/bin/python3.6

And either the upsource did not refresh the project since then or it does not search for the library in the /usr/local folder. Anyway you can see that the binary is in my path. I would expect upsource to check the path first and then look for the python installation in other places.

I'd suggest to add the possibility to choose a python interpreter manually. This way I can at least create my own venv as I do it in the InteliJ project until you come up with some sleek way to handle this problem.

 

0
Comment actions Permalink

Yes, it's a good suggestion. We'll make it possibly to select venv for Python projects. But so far, no estimates yet. 

1

Please sign in to leave a comment.