New Pyramid Project - have no package install

72 views
Skip to first unread message

Alex Kinchak

unread,
Mar 5, 2021, 4:10:08 PM3/5/21
to pylons-discuss
Hello, 
I`m facing such a problem: when creating new Pyramid project (as 'myproject', PyCharm 2020.3) I have no one more (nested) 'myproject' package (with routes, views etc.). Maybe someone have any idea about it?
Thank you

SHOULD BE:
SHOULD_BE.jpg

I HAVE:
I_HAVE.jpg

Jeremy D

unread,
Mar 5, 2021, 4:16:37 PM3/5/21
to pylons-...@googlegroups.com
Did you create the project from within Pycharm? I just tried it on my end to be sure, same version as you, using these settings:

pycharm64_LGkPq21u0r.png

and the resulting file structure looks like this, as intended:

pycharm64_3r6a7opvk8.png
Maybe restart pycharm and try again?

--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/f244d271-130d-43c3-ae15-d4c5862378efn%40googlegroups.com.

Steve Piercy

unread,
Mar 5, 2021, 4:22:16 PM3/5/21
to pylons-...@googlegroups.com
See also my lightning talk video from PloneConf 2020.

https://youtu.be/2kB9Wtg0j4s

Note that this is for PyCharm Professional.

Also important at 1:20 in the video there is an important comment about how PyCharm runs the first three steps in the README for you automatically, so you should not do them again.

--steve


On 3/5/21 1:15 PM, Jeremy D wrote:
> Did you create the project from within Pycharm? I just tried it on my end to be sure, same version as you, using these settings:
>
> pycharm64_LGkPq21u0r.png
>
> and the resulting file structure looks like this, as intended:
>
> pycharm64_3r6a7opvk8.png
> Maybe restart pycharm and try again?
>
> On Fri, Mar 5, 2021 at 3:10 PM Alex Kinchak <akin...@gmail.com <mailto:akin...@gmail.com>> wrote:
>
> Hello, 
> I`m facing such a problem: when creating new Pyramid project (as 'myproject', PyCharm 2020.3) I have no one more (nested) 'myproject' package (with routes, views etc.). Maybe someone have any idea about it?
> Thank you
>
> *SHOULD BE:*
> SHOULD_BE.jpg
>
> *I HAVE:*
> *I_HAVE.jpg
> *
>
> --
> You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com <mailto:pylons-discus...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/f244d271-130d-43c3-ae15-d4c5862378efn%40googlegroups.com <https://groups.google.com/d/msgid/pylons-discuss/f244d271-130d-43c3-ae15-d4c5862378efn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com <mailto:pylons-discus...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/CAKYctxK9rvVn6ExMGpPZ%3DTrv%3Dgzf_KaeBGCB8FxUJcM_NV%2B4TQ%40mail.gmail.com <https://groups.google.com/d/msgid/pylons-discuss/CAKYctxK9rvVn6ExMGpPZ%3DTrv%3Dgzf_KaeBGCB8FxUJcM_NV%2B4TQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Alex Kinchak

unread,
Mar 5, 2021, 5:23:30 PM3/5/21
to pylons-discuss
Thank you for the message. 
Yes,  from within Pycharm. I made video with once again trying to start but with the same result - VIDEO
суббота, 6 марта 2021 г. в 00:16:37 UTC+3, jdavi...@gmail.com:

Alex Kinchak

unread,
Mar 5, 2021, 5:29:35 PM3/5/21
to pylons-discuss
Hi Steve,
Thanks so much for Ploneconf 2020: Pyramid training!  It`s a big help in my Pyramid way as beginner! 

суббота, 6 марта 2021 г. в 00:22:16 UTC+3, Steve Piercy:

Alex Kinchak

unread,
Mar 5, 2021, 6:03:27 PM3/5/21
to pylons-discuss
Hm... I did it with another path (C-disk path vs D).  Is it mandatory to deploy projects on disk C (PyCharm  installing location by default) and no other (say D) ? 

суббота, 6 марта 2021 г. в 01:29:35 UTC+3, Alex Kinchak:

Andi Blake

unread,
Mar 5, 2021, 6:09:58 PM3/5/21
to pylons-...@googlegroups.com
Hi Alex, 

I reproduced the things you mentioned and for me this seems to work fine. Screenshots attached. 

Best, Andi






Alex Kinchak

unread,
Mar 5, 2021, 6:17:05 PM3/5/21
to pylons-discuss
Hi Andi, 
thank you for the message.
I have solved the problem changing path_to_project from D-disk to C-disk. Is it mandatory to deploy projects on disk C (PyCharm installing location by default) and no other?  

суббота, 6 марта 2021 г. в 02:09:58 UTC+3, andi....@googlemail.com:

Steve Piercy

unread,
Mar 5, 2021, 10:32:43 PM3/5/21
to pylons-...@googlegroups.com
Interesting. Given that the other files get written to D:\, I think it is unusual that the rest of the project files do not also get written. I would suggest that you create a ticket in the PyCharm issue tracker, and reference your video:

https://youtrack.jetbrains.com/issues/PY

--steve


On 3/5/21 3:17 PM, Alex Kinchak wrote:
> Hi Andi, 
> thank you for the message.
> I have solved the problem changing path_to_project from D-disk to C-disk. Is it mandatory to deploy projects on disk C (PyCharm installing location by default) and no other?  
>
> суббота, 6 марта 2021 г. в 02:09:58 UTC+3, andi....@googlemail.com:
>
> Hi Alex, 
>
> I reproduced the things you mentioned and for me this seems to work fine. Screenshots attached. 
>
> Best, Andi
>
>
>
>
>
>
>> On 5. Mar 2021, at 23:23, Alex Kinchak <akin...@gmail.com> wrote:
>>
>> Thank you for the message. 
>> Yes,  from within Pycharm. I made video with once again trying to start but with the same result - VIDEO <https://www.youtube.com/watch?v=R1vWB_LZkPU>
>> суббота, 6 марта 2021 г. в 00:16:37 UTC+3, jdavi...@gmail.com <http://gmail.com>:
>>
>> Did you create the project from within Pycharm? I just tried it on my end to be sure, same version as you, using these settings:
>>
>> pycharm64_LGkPq21u0r.png
>>
>> and the resulting file structure looks like this, as intended:
>>
>> pycharm64_3r6a7opvk8.png
>> Maybe restart pycharm and try again?
>>
>> On Fri, Mar 5, 2021 at 3:10 PM Alex Kinchak <akin...@gmail.com> wrote:
>>
>> Hello, 
>> I`m facing such a problem: when creating new Pyramid project (as 'myproject', PyCharm 2020.3) I have no one more (nested) 'myproject' package (with routes, views etc.). Maybe someone have any idea about it?
>> Thank you
>>
>> *SHOULD BE:*
>> SHOULD_BE.jpg
>>
>> *I HAVE:*
>> *I_HAVE.jpg
>> *
>>
>> --
>> You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/f244d271-130d-43c3-ae15-d4c5862378efn%40googlegroups.com <https://groups.google.com/d/msgid/pylons-discuss/f244d271-130d-43c3-ae15-d4c5862378efn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/5dcd9f64-4191-4ee9-a2c2-9063599ceaefn%40googlegroups.com <https://groups.google.com/d/msgid/pylons-discuss/5dcd9f64-4191-4ee9-a2c2-9063599ceaefn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com <mailto:pylons-discus...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/5790301d-dcf2-4eef-94a0-9971a1643881n%40googlegroups.com <https://groups.google.com/d/msgid/pylons-discuss/5790301d-dcf2-4eef-94a0-9971a1643881n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Andi Blake

unread,
Mar 8, 2021, 9:02:45 PM3/8/21
to pylons-...@googlegroups.com
Hi Alex, 

I have absolutely no idea about C or D disk on windows; sorry for that :)  

Yet I saw something, which is not so obvious for a Pycharm created project to work. For some reason, Pycharm seems not to install all the dependencies from `setup.py`, which defines the dependecies of your Python project. 

To make Pycharm install the depencies of your project, I did this:

- We create a new Pyramid project


- After that, Pycharm complains about missing dependencies, although it is using the correct interpreter from the venv


- To let Pycharm install the project dependencies of `setup.py`, I  installed them via the Pycharm Terminal


- After that, all failing imports have been gone. 


Hope this helps, 
Andi

Steve Piercy

unread,
Mar 8, 2021, 9:31:19 PM3/8/21
to 'Andi Blake' via pylons-discuss
Upon completion of generating a project from pyramid-cookiecutter-starter, PyCharm opens up the project's README.txt, having already completed the first 3 steps, as shown below, for example.

- Change directory into your newly created project if not already there. Your
current directory should be the same as this README.txt file and setup.py.

cd new_project

- Create a Python virtual environment, if not already created.

python3 -m venv env

- Upgrade packaging tools, if necessary.

env/bin/pip install --upgrade pip setuptools

I can't tell exactly, but it appears that PyCharm only installs cookiecutter and its dependencies into the virtual environment (see screenshot). It definitely does not automatically install the project. It is left to the developer to install their project by following the remaining steps in the README.txt. This is intentional, as the remaining steps vary according to selections made when generating a project from pyramid-cookiecutter-starter and are too crazy for JetBrains to automate.

--steve


On 3/5/21 3:38 PM, 'Andi Blake' via pylons-discuss wrote:
> Hi Alex, 
>
> I have absolutely no idea about C or D disk on windows; sorry for that :)  
>
> Yet I saw something, which is not so obvious for a Pycharm created project to work. For some reason, Pycharm seems not to install all the dependencies from `setup.py`, which defines the dependecies of your Python project. 
>
> To make Pycharm install the depencies of your project, I did this:
>
> - We create a new Pyramid project
>
>
> - After that, Pycharm complains about missing dependencies, although it is using the correct interpreter from the venv
>
>
> - To let Pycharm install the project dependencies of `setup.py`, I  installed them via the Pycharm Terminal
>
>
> - After that, all failing imports have been gone. 
>
>
> Hope this helps, 
> Andi
>
>> On 6. Mar 2021, at 00:17, Alex Kinchak <akin...@gmail.com <mailto:akin...@gmail.com>> wrote:
>>
>> Hi Andi, 
>> thank you for the message.
>> I have solved the problem changing path_to_project from D-disk to C-disk. Is it mandatory to deploy projects on disk C (PyCharm installing location by default) and no other?  
>>
>> суббота, 6 марта 2021 г. в 02:09:58 UTC+3, andi....@googlemail.com <http://googlemail.com/>: 
>>
>> Hi Alex, 
>>
>> I reproduced the things you mentioned and for me this seems to work fine. Screenshots attached. 
>>
>> Best, Andi
>>
>>
>>
>>
>>
>>
>>> On 5. Mar 2021, at 23:23, Alex Kinchak <akin...@gmail.com> wrote:
>>>
>>> Thank you for the message. 
>>> Yes,  from within Pycharm. I made video with once again trying to start but with the same result - VIDEO <https://www.youtube.com/watch?v=R1vWB_LZkPU>
>>> суббота, 6 марта 2021 г. в 00:16:37 UTC+3, jdavi...@gmail.com <http://gmail.com/>: 
>>>
>>> Did you create the project from within Pycharm? I just tried it on my end to be sure, same version as you, using these settings:
>>>
>>> pycharm64_LGkPq21u0r.png
>>>
>>> and the resulting file structure looks like this, as intended:
>>>
>>> pycharm64_3r6a7opvk8.png
>>> Maybe restart pycharm and try again?
>>>
>>> On Fri, Mar 5, 2021 at 3:10 PM Alex Kinchak <akin...@gmail.com <http://gmail.com/>> wrote:
>>>
>>> Hello, 
>>> I`m facing such a problem: when creating new Pyramid project (as 'myproject', PyCharm 2020.3) I have no one more (nested) 'myproject' package (with routes, views etc.). Maybe someone have any idea about it?
>>> Thank you
>>>
>>> *SHOULD BE:*
>>> SHOULD_BE.jpg
>>>
>>> *I HAVE:*
>>> *I_HAVE.jpg
>>> *
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com <http://googlegroups.com/>.
>>> To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/f244d271-130d-43c3-ae15-d4c5862378efn%40googlegroups.com <https://groups.google.com/d/msgid/pylons-discuss/f244d271-130d-43c3-ae15-d4c5862378efn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>>
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/5dcd9f64-4191-4ee9-a2c2-9063599ceaefn%40googlegroups.com <https://groups.google.com/d/msgid/pylons-discuss/5dcd9f64-4191-4ee9-a2c2-9063599ceaefn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com <mailto:pylons-discus...@googlegroups.com>.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/5790301d-dcf2-4eef-94a0-9971a1643881n%40googlegroups.com <https://groups.google.com/d/msgid/pylons-discuss/5790301d-dcf2-4eef-94a0-9971a1643881n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com <mailto:pylons-discus...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/69294950-BFFC-4B9B-BE1F-3B3DF82C6231%40googlemail.com <https://groups.google.com/d/msgid/pylons-discuss/69294950-BFFC-4B9B-BE1F-3B3DF82C6231%40googlemail.com?utm_medium=email&utm_source=footer>.

Screen Shot 2021-03-08 at 6.13.30 PM.png

Alex Kinchak

unread,
Mar 9, 2021, 6:53:13 AM3/9/21
to pylons-discuss

  2 days ago I made a ticket in the PyCharm issue tracker as I am advised by Steve.  
вторник, 9 марта 2021 г. в 05:31:19 UTC+3, Steve Piercy:
Reply all
Reply to author
Forward
0 new messages