Unable to install Flask-Mongoengine
Hi Guys,
I am unable to install *Flask-Mongoengine* using pip. Here are my
specifications
1. *OS* => OSX 10.14.6
2. *Python* => Python 3.8.0 (Working in a virtualenv)
3. *Dependency Manager* => pip(19.3.1), setuptools(42.0.2)
3. *Flask-Mongoengine* => flask-mongoengine==0.9.5
I am inside my virtualenv and trying to install flask-mongoengine using
> (env) $ pip install flask-mongoengine==0.9.5
Here is my error
> distutils.errors.DistutilsError: Command
> '['/Users/onlinejudge95/Workspace/GitHub/alma-serv/env/bin/python', '-m',
> 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w',
> '/var/folders/r7/pgqw605n55x5f9018rp72hsmgn/T/tmpgrvp80jd', '--quiet',
> 'rednose']' returned non-zero exit status 1.
Please Find attached my full error log.
I am on a new system in which i installed python through the mac installer
from python.org, i had run the *Install Certificates.command* for SSL
related issues, if it might be of help.
In case there is a more specific mailing list to redirect to, please let me
know.
Thanks,
onlinejudge95
(env) $ pip install flask-mongoengine
Collecting flask-mongoengine
Using cached
https://files.pythonhosted.org/packages/20/53/1bb8ad34ad5c2047a11651290325e55086bc18fce7cfdbbe6f5522bd0ae5/flask-mongoengine-0.9.5.tar.gz
ERROR: Command errored out with exit status 1:
command: /Users/onlinejudge95/Workspace/GitHub/alma-serv/env/bin/python3
-c 'import sys, setuptools, tokenize; sys.argv[0] =
'"'"'/private/var/folders/r7/pgqw605n55x5f9018rp72hsmgn/T/pip-install-73496mgp/flask-mongoengine/setup.py'"'"';
__file__='"'"'/private/var/folders/r7/pgqw605n55x5f9018rp72hsmgn/T/pip-install-73496mgp/flask-mongoengine/setup.py'"'"';f=getattr(tokenize,
'"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"',
'"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info
--egg-base
/private/var/folders/r7/pgqw605n55x5f9018rp72hsmgn/T/pip-install-73496mgp/flask-mongoengine/pip-egg-info
cwd:
/private/var/folders/r7/pgqw605n55x5f9018rp72hsmgn/T/pip-install-73496mgp/flask-mongoengine/
Complete output (44 lines):
WARNING: The wheel package is not available.
ERROR: Command errored out with exit status 1:
command: /Users/onlinejudge95/Workspace/GitHub/alma-serv/env/bin/python3
-u -c 'import sys, setuptools, tokenize; sys.argv[0] =
'"'"'/private/var/folders/r7/pgqw605n55x5f9018rp72hsmgn/T/pip-wheel-z44wznx3/rednose/setup.py'"'"';
__file__='"'"'/private/var/folders/r7/pgqw605n55x5f9018rp72hsmgn/T/pip-wheel-z44wznx3/rednose/setup.py'"'"';f=getattr(tokenize,
'"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"',
'"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'
bdist_wheel -d
/private/var/folders/r7/pgqw605n55x5f9018rp72hsmgn/T/pip-wheel-qz9lk008
cwd:
/private/var/folders/r7/pgqw605n55x5f9018rp72hsmgn/T/pip-wheel-z44wznx3/rednose/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
ERROR: Failed building wheel for rednose
ERROR: Failed to build one or more wheels
Traceback (most recent call last):
File
"/Users/onlinejudge95/Workspace/GitHub/alma-serv/env/lib/python3.8/site-packages/setuptools/installer.py",
line 128, in fetch_build_egg
subprocess.check_call(cmd)
File
"/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py",
line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command
'['/Users/onlinejudge95/Workspace/GitHub/alma-serv/env/bin/python3', '-m',
'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w',
'/var/folders/r7/pgqw605n55x5f9018rp72hsmgn/T/tmpjzg2lnoc', '--quiet',
'rednose']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File
"/private/var/folders/r7/pgqw605n55x5f9018rp72hsmgn/T/pip-install-73496mgp/flask-mongoengine/setup.py",
line 36, in
setup(
File
"/Users/onlinejudge95/Workspace/GitHub/alma-serv/env/lib/python3.8/site-packages/setuptools/__init__.py",
line 144, in setup
_install_setup_requires(attrs)
File
"/Users/onlinejudge95/Workspace/GitHub/alma-serv/env/lib/python3.8/site-packages/setuptools/__init__.py",
line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File
"/Users/onlinejudge95/Workspace/GitHub/alma-serv/env/lib/python3.8/site-packages/setuptools/dist.py",
line 718, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File
"/Users/onlinejudge95/Works
Re: Unable to install Flask-Mongoengine
how about pip3? On Sun, Dec 15, 2019 at 5:16 PM Test Bot wrote: > Hi Guys, > > I am unable to install *Flask-Mongoengine* using pip. Here are my > specifications > > 1. *OS* => OSX 10.14.6 > 2. *Python* => Python 3.8.0 (Working in a virtualenv) > 3. *Dependency Manager* => pip(19.3.1), setuptools(42.0.2) > 3. *Flask-Mongoengine* => flask-mongoengine==0.9.5 > > I am inside my virtualenv and trying to install flask-mongoengine using > > > (env) $ pip install flask-mongoengine==0.9.5 > > > Here is my error > > > distutils.errors.DistutilsError: Command > > '['/Users/onlinejudge95/Workspace/GitHub/alma-serv/env/bin/python', '-m', > > 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', > > '/var/folders/r7/pgqw605n55x5f9018rp72hsmgn/T/tmpgrvp80jd', > '--quiet', > > 'rednose']' returned non-zero exit status 1. > > > Please Find attached my full error log. > > I am on a new system in which i installed python through the mac installer > from python.org, i had run the *Install Certificates.command* for SSL > related issues, if it might be of help. > > In case there is a more specific mailing list to redirect to, please let me > know. > > Thanks, > onlinejudge95 > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list
Re: Unable to install Flask-Mongoengine
No help with using pip3 On Sun, Dec 15, 2019 at 2:49 PM tommy yama wrote: > how about pip3? > > On Sun, Dec 15, 2019 at 5:16 PM Test Bot wrote: > >> Hi Guys, >> >> I am unable to install *Flask-Mongoengine* using pip. Here are my >> specifications >> >> 1. *OS* => OSX 10.14.6 >> 2. *Python* => Python 3.8.0 (Working in a virtualenv) >> 3. *Dependency Manager* => pip(19.3.1), setuptools(42.0.2) >> 3. *Flask-Mongoengine* => flask-mongoengine==0.9.5 >> >> I am inside my virtualenv and trying to install flask-mongoengine using >> >> > (env) $ pip install flask-mongoengine==0.9.5 >> >> >> Here is my error >> >> > distutils.errors.DistutilsError: Command >> > '['/Users/onlinejudge95/Workspace/GitHub/alma-serv/env/bin/python', >> '-m', >> > 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', >> > '/var/folders/r7/pgqw605n55x5f9018rp72hsmgn/T/tmpgrvp80jd', >> '--quiet', >> > 'rednose']' returned non-zero exit status 1. >> >> >> Please Find attached my full error log. >> >> I am on a new system in which i installed python through the mac installer >> from python.org, i had run the *Install Certificates.command* for SSL >> related issues, if it might be of help. >> >> In case there is a more specific mailing list to redirect to, please let >> me >> know. >> >> Thanks, >> onlinejudge95 >> -- >> https://mail.python.org/mailman/listinfo/python-list >> > -- https://mail.python.org/mailman/listinfo/python-list
Re: Python3 - How do I import a class from another file
On Thu, 12 Dec 2019 11:33:25 + Rhodri James wrote: > On 11/12/2019 21:32, [email protected] wrote: > > Plain and simple: When the refcount reaches zero. > You are assuming that "when" implies "immediately on the occurence." I'm not implying that. It's the dictionary definition of the word "when." > This happens to be the behaviour in CPython, but other > implementations vary as Chris has explained several times now. And he's right. The documentation is unclear. It should be re-worded to reflect that the point at which the __del__() method is called after the refcount reaches zero is unspecified. -- https://mail.python.org/mailman/listinfo/python-list
Re: Python3 - How do I import a class from another file
On Sun, Dec 15, 2019 at 10:01 PM wrote: > > On Thu, 12 Dec 2019 11:33:25 + > Rhodri James wrote: > > > On 11/12/2019 21:32, [email protected] wrote: > > > Plain and simple: When the refcount reaches zero. > > > You are assuming that "when" implies "immediately on the occurence." > > I'm not implying that. It's the dictionary definition of the word > "when." > > > This happens to be the behaviour in CPython, but other > > implementations vary as Chris has explained several times now. > > And he's right. The documentation is unclear. It should be re-worded to > reflect that the point at which the __del__() method is called after > the refcount reaches zero is unspecified. In Magic: The Gathering, "when" means "after this happens, the next time its controller has priority, and then once the ability has a chance to resolve". In common English, "when" can often mean "at some extremely unspecified time point after" - for instance, "it's garbage night, so when you get home, put the bins out". Nothing in the word "when" mandates any sort of immediacy. Trying to stipulate all of this would make the documentation LESS clear. The Python documentation should not read like a EULA. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Server side Blazor-like framework in Python?
I've been doing a lot of development with server side Blazor on .NET recently, and I think it's a very interesting UI model (https://docs.microsoft.com/en-us/aspnet/core/blazor/hosting-models?view=aspnetcore-3.1). What would it take to make something similar in Python? I guess a lot of relevant Python packages already exist. SSB works by having a component/DOM model running on the server. The client web page sends events and receives DOM diffs over a SignalR/websocket comnection. -- https://mail.python.org/mailman/listinfo/python-list
Re: Server side Blazor-like framework in Python?
On Sun, Dec 15, 2019 at 11:11 PM wrote: > > I've been doing a lot of development with server side Blazor on .NET > recently, and I think it's a very interesting UI model > (https://docs.microsoft.com/en-us/aspnet/core/blazor/hosting-models?view=aspnetcore-3.1). > What would it take to make something similar in Python? I guess a lot of > relevant Python packages already exist. > > SSB works by having a component/DOM model running on the server. The client > web page sends events and receives DOM diffs over a SignalR/websocket > comnection. > I *much* prefer to have the front end in charge of the UI, and the back end work as an API. Just send and receive JSON with useful information in it, and let the front end figure out how it wants to display that. But hey, if you want to ship a DOM diff down the wire, go ahead. Just don't ask me to use your tool. :) ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: Randomizing Strings In A Microservices World
On 12/10/19 12:37 PM, Chris Angelico wrote: > On Wed, Dec 11, 2019 at 5:01 AM Tim Daneliuk wrote: >> >> On 12/10/19 10:36 AM, Peter Pearson wrote: >>> Just to be sure: you *are* aware that the "Birthday Paradox" says >>> that if you pick your 10-digit strings truly randomly, you'll probably >>> get a collision by the time of your 10**5th string . . . right? >> >> I did not consider this, but the point is taken. >> >> Could you kindly point me to a source for calculating this given >> n-digit numeric-only strings? >> > > The exact formula is pretty gnarly, but you can get remarkably close > by assuming that you're likely to get a collision at the square root - > which is half the exponent (so a 16-bit checksum will collide after > about 2**8 examples, and a 128-bit UUID4 will collide after about > 2**64 UUIDs are generated). > > https://en.wikipedia.org/wiki/Birthday_problem > > ChrisA > Close enough for my purposes. Thanks. -- https://mail.python.org/mailman/listinfo/python-list
Re: Server side Blazor-like framework in Python?
+1 Though the implementation might be good from an exercise perspective. But there is a general philosophy in Software Engineering namely Separation of Concern. Python as a language is not concerned about the "Front-End" side of things since it is not meant for that. Though i am a very devote Python programmer, i would still prefer to limit Python to backend tasks and have the Front End implemented in React. On Sun, Dec 15, 2019 at 5:47 PM Chris Angelico wrote: > On Sun, Dec 15, 2019 at 11:11 PM wrote: > > > > I've been doing a lot of development with server side Blazor on .NET > recently, and I think it's a very interesting UI model ( > https://docs.microsoft.com/en-us/aspnet/core/blazor/hosting-models?view=aspnetcore-3.1). > What would it take to make something similar in Python? I guess a lot of > relevant Python packages already exist. > > > > SSB works by having a component/DOM model running on the server. The > client web page sends events and receives DOM diffs over a > SignalR/websocket comnection. > > > > I *much* prefer to have the front end in charge of the UI, and the > back end work as an API. Just send and receive JSON with useful > information in it, and let the front end figure out how it wants to > display that. > > But hey, if you want to ship a DOM diff down the wire, go ahead. Just > don't ask me to use your tool. :) > > ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list
Re: Server side Blazor-like framework in Python?
Separation of concerns is not a question about language, but how your code is organised. Python is a general-purpose language and isn't restricted to certain programming domains. The restrictions are purely practical, such as performance and the availability of the runtime on various platforms. There are many Python frameworks that could qualify as front end tools, including various attempts at running Python on the JS runtime in browsers. The pyodide project which runs Python and native code on webassembly in the browser, frameworks for desktop applications and even command line interfaces are all front end. -- https://mail.python.org/mailman/listinfo/python-list
Re: Server side Blazor-like framework in Python?
Not to mention Flask and Django, both popular tools for making front ends, but the question wasn't about which personal opinions people have about this or that. I was wondering how one could make something similar to server side Blazor in Python. In particular, whether there are libraries that could be helpful. You would at least need some server side websocket code for managing connections and state, and preferably some templating system that could be translated to DOM elements mixed with data and event bindings the way the component model would need them. The component model itself should be possible to port from the Blazor source code. -- https://mail.python.org/mailman/listinfo/python-list
Re: Unable to install Flask-Mongoengine
On 2019-12-15 03:13, Test Bot wrote: I am unable to install *Flask-Mongoengine* using pip. Here are my specifications 1. *OS* => OSX 10.14.6 2. *Python* => Python 3.8.0 (Working in a virtualenv) 3. *Dependency Manager* => pip(19.3.1), setuptools(42.0.2) 3. *Flask-Mongoengine* => flask-mongoengine==0.9.5 I am inside my virtualenv and trying to install flask-mongoengine using (env) $ pip install flask-mongoengine==0.9.5 Here is my error distutils.errors.DistutilsError: Command '['/Users/onlinejudge95/Workspace/GitHub/alma-serv/env/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/r7/pgqw605n55x5f9018rp72hsmgn/T/tmpgrvp80jd', '--quiet', 'rednose']' returned non-zero exit status 1. You are running into an issue caused by a change in setuptools: https://github.com/pypa/setuptools/issues/1934 It looks like the simplest solution is to first install the wheel package in your venv: pip install wheel pip install flask-mongoengine==0.9.5 Either that or install a previous version of setuptools. You may want to chime in on the discussion of that issue. -- https://mail.python.org/mailman/listinfo/python-list
Re: Setting Pythonpath programmatic
Prasad Rajassekaran writes: > I would want to set python path programmatic in my project. So that, all > other directories files can be imported without any issues. You can extend "sys.path" programmatically to control where Python looks for top level packages/modules (as you apparently have already tried - it should have worked). You may also read about ".pth" files (= "path configuration files"), documented with Python's "site" module. It allows a folder on "sys.path" to specify where else to look for top level packages/modules. I have seen cases where "sys.path" extensions had not the expected effects. This has been with so called "namespace packages" (this is some kind of distributed package, where package components can be found in unrelated locations). I never was able to find the cause: apparently, it was related to the discrepancy between the modern installation approach (the namespace package components become centralized on installation) and the traditional approach (the components remain distributed); for me, it looked like a Python bug affecting the case when both approaches have been applied to the same namespace package. I do not think that your problem is related to this case. -- https://mail.python.org/mailman/listinfo/python-list
Re: Pickle caching objects?
José María Mateos writes: > I just asked this question on the IRC channel but didn't manage to get > a response, though some people replied with suggestions that expanded > this question a bit. > > I have a program that has to read some pickle files, perform some > operations on them, and then return. The pickle objects I am reading > all have the same structure, which consists of a single list with two > elements: the first one is a long list, the second one is a numpy > object. > > I found out that, after calling that function, the memory taken by the > Python executable (monitored using htop -- the entire thing runs on > Python 3.6 on an Ubuntu 16.04, pretty standard conda installation with > a few packages installed directly using `conda install`) increases in > proportion to the size of the pickle object being read. My intuition > is that that memory should be free upon exiting. > > Does pickle keep a cache of objects in memory after they have been > returned? "pickle.load" does not itself cache objects in memory. However, Python may cache some (usually small objects, such as some integer objects). Note also that Python memeory management is quite elaborate: not every memory block is immediately obtained from and released to the operating system: Python has its own memory management data structures (to fill the gap between the fine grained memory requirements of a Python application and the mostly crude memory management services the operating system supports out of hand). This means that usually, a memory block freed by the Python application is not returned to the operating system but maintained by Python's memory management to be reused later. As a consequence, operating system tools for memory monitoring usually cannot tell the amount of memory really used by the application. -- https://mail.python.org/mailman/listinfo/python-list
