Closed NeroAdvents closed 4 years ago
Which pip version do you use? Maybe you can try git clone pyconcrete and execute setup.py install directly
Hi,
First, here is my pip version:
pip 20.1.1 from /home/nordine/.local/lib/python3.6/site-packages/pip (python 3.6)
I did install the module with the setup file and it seems to be working now that I have .pye generated in my project directory. I'm actually using it on a simple django project that I made to test it and I wanted to ask you what was I supposed to do after generating those .pye files.
Now that I have my .pye files generated, I did delete all my .py and tried to run the manage file like so:
➜ myapp git:(master) ✗ python3 manage.pye runserver
File "manage.pye", line 1
SyntaxError: Non-UTF-8 code starting with '\xc5' in file manage.pye on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
Maybe I'm wrong on how to proceed, then I wouldn't be against a little help on how to make my app running. Thank you !
Please reference README https://github.com/Falldog/pyconcrete#partial-encrypted-pyconcrete-as-lib For your case, please leave manage.py as plant script file
Hi again,
Well I did install pyconcrete as a lib like so:
python3 setup.py install --install-lib=/home/nordine/PycharmProjects/Pyconcrete/django-tutorial/myapp --install-scripts=/home/nordine/PycharmProjects/Pyconcrete/django-tutorial/myapp
In order to have the same project layout like it was mentioned in the tutorial:
main.py # import pyconcrete and your lib
pyconcrete/* # put pyconcrete lib in project root, keep it as original files
src/*.pye # your libs
-------- my project --------
manage.py
pyconcrete/*
all my pckg/*.pye
Then I did import pyconcrete inside my manage.py but still it's not working properly:
(venv) ➜ myapp git:(master) ✗ python3 manage.py runserver
Traceback (most recent call last):
File "manage.py", line 5, in <module>
import pyconcrete
File "/home/nordine/PycharmProjects/Pyconcrete/django-tutorial/myapp/pyconcrete/__init__.py", line 29, in <module>
from . import _pyconcrete
ImportError: cannot import name '_pyconcrete' from partially initialized module 'pyconcrete' (most likely due to a circular import) (/home/nordine/PycharmProjects/Pyconcrete/django-tutorial/myapp/pyconcrete/__init__.py)
Here is my project folder structure:
.
├── core
├── db.sqlite3
├── __init__.py
├── manage.py
├── myapp
├── polls
├── pyconcrete
├── pyconcrete-0.12.1.egg-info
├── pyconcrete-admin.py
├── pyconcrete.pth
├── reviews
├── static
├── todolis
└── upload
I think I did something wrong but I don't know what so if you have the answer to my problem it would be great. Thank you.
After you install pyconcrete, there should be a _pyconcrete.so
, that's why the exception told you cannot import _pyconcrete. Please make sure pyconcrete files under your import path
Hello,
I'm having some issues when installing pyconcrete with pip.This is the returned errors:
When i'm adding the flag egg like in the tutorial this is what it returns:
Can someone help me with this ? Thank you.