All other Source.Python topics and issues.
4 posts • Page 1 of 1
A while ago, I was working on a source-python plugin in PyCharm, and had the project nicely setup to recognise the sp packages, but also, most importantly, under the project interpreter tab, if I installed a site package, it would automatically install it to the source-python site-packages folder allowing me to use that package in my plugin. Coming back to it now, I have no idea how to set it up to do this again. I see that I can configure the project interpreter to be a virtual environment (which I believe source-python uses), but again I have no idea how to configure this to recognise the sp installation. I guess I had figured this stuff out originally, but that was about a year ago and it seems I am lost again, so hopefully we can make this thread a resource for other people trying to get started with PyCharm.
satoon101 wrote:You might check out my reply here:
I did read this post when I originally set up my project, and read it again this time. That all works to set up the SP modules, but what im more concerned with configuring the interpreter so that installing site packages through PyCharm will actually install them to the source-python folder and make them usable. I somehow had this setup working before, but I don't remember what I did :(
When installing a site package (ie pymesh) through this tool, it will only install it to my regular python installation (as you would expect from the way its configured), and thus I cannot use pymesh in my plugin since it will fail to import it. However I previously had this configured so that it would automagically install the site package into addons\source-python\packages\site-packages allowing me to use that package import in my plugins. Since my plugin(s) require many site packages to function, it was very convenient to install them this way, but I seem to be lost in getting that working again. From what I understand, source-python ships with an (isolated?) python environment in the addons\source-python\Python3 directory and PyCharm supports setting the project interpreter as a virtual env seen here
, but I really don't know how to configure this to recognise the SP python environment.
Hopefully this makes it more clear what I am after, basically the site packages installation is the main tool I am wanting
I am currently on holiday and will be moving later this week, as well, so I won't be able to help further till next week at the earliest.
Who is online
Users browsing this forum: No registered users and 1 guest