Error installing requirements
PS C:\Users\Nepapa David\cpims_api> pip install -r requirements/base.txt DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-suppor t pip 21.0 will remove support for this functionality. Requirement already satisfied: Django==1.8.15 in c:\users\nepapa david\cpims_api\venv1\lib\site-packages (from -r requirements/base.txt (line 1)) (1.8.15) Requirement already satisfied: django-crispy-forms==1.6.0 in c:\users\nepapa david\cpims_api\venv1\lib\site-packages (from -r requirements/base.txt (line 2)) (1.6.0) Requirement already satisfied: jellyfish==0.5.4 in c:\users\nepapa david\cpims_api\venv1\lib\site-packages (from -r requirements/base.txt (line 3)) (0.5.4) Collecting pillow==3.3.2 Using cached Pillow-3.3.2.tar.gz (10.6 MB) Collecting psycopg2 Using cached psycopg2-2.8.6-cp27-cp27m-win_amd64.whl (1.1 MB) Collecting reportlab==3.3.0 Using cached reportlab-3.3.0-cp27-none-win_amd64.whl (2.1 MB) Collecting djangorestframework==3.3.3 Using cached djangorestframework-3.3.3-py2.py3-none-any.whl (662 kB) Processing c:\users\nepapa david\appdata\local\pip\cache\wheels\61\84\91\bea40ba16a87ba77cfee951da2d1d73cd8126cc3b5c1f7e327\openpyxl-2.4.0-py2.py3-none-any.whl Collecting python-dateutil==2.4.2 Using cached python_dateutil-2.4.2-py2.py3-none-any.whl (188 kB) Collecting python-memcached Using cached python_memcached-1.59-py2.py3-none-any.whl (16 kB) Collecting pandas==0.20.3 Using cached pandas-0.20.3-cp27-cp27m-win_amd64.whl (8.3 MB) Collecting xlsxwriter==0.9.8 Using cached XlsxWriter-0.9.8-py2.py3-none-any.whl (137 kB) Collecting django-import-export==1.2.0 Using cached django_import_export-1.2.0-py2.py3-none-any.whl (75 kB) Collecting sentry-sdk==0.10.0 Using cached sentry_sdk-0.10.0-py2.py3-none-any.whl (75 kB) Collecting schedule==0.6.0 Using cached schedule-0.6.0-py2.py3-none-any.whl (8.7 kB) Collecting requests==2.22.0 Using cached requests-2.22.0-py2.py3-none-any.whl (57 kB) Collecting django-admin-sortable Using cached django_admin_sortable-2.3-py2-none-any.whl (115 kB) Processing c:\users\nepapa david\appdata\local\pip\cache\wheels\29\e8\37\8866c07502322a658fdf2b346cef1902c16494c1e0ef1b9b73\django_simple_forums-1.3.6-py2-none-any.wh l Collecting markdown Using cached Markdown-3.1.1-py2.py3-none-any.whl (87 kB) Requirement already satisfied: setuptools>=2.2 in c:\users\nepapa david\cpims_api\venv1\lib\site-packages (from reportlab==3.3.0->-r requirements/base.txt (line 6)) ( 44.1.1) Requirement already satisfied: pip>=1.4.1 in c:\users\nepapa david\cpims_api\venv1\lib\site-packages (from reportlab==3.3.0->-r requirements/base.txt (line 6)) (20.3. 4) Processing c:\users\nepapa david\appdata\local\pip\cache\wheels\8d\22\36\204262bf2e0e1bd954606953bc164321f6b481d4922ffb823a\et_xmlfile-1.0.1-py2-none-any.whl Collecting jdcal Using cached jdcal-1.4.1-py2.py3-none-any.whl (9.5 kB) Collecting six>=1.5 Using cached six-1.16.0-py2.py3-none-any.whl (11 kB) Collecting numpy>=1.7.0 Using cached numpy-1.16.6-cp27-cp27m-win_amd64.whl (11.9 MB) Collecting pytz>=2011k Using cached pytz-2021.3-py2.py3-none-any.whl (503 kB) Processing c:\users\nepapa david\appdata\local\pip\cache\wheels\2f\c3\a5\1e95754397eea31c33840174c762ea4f871cb42a75c8ea57b7\diff_match_patch-20200713-py2-none-any.whl Processing c:\users\nepapa david\appdata\local\pip\cache\wheels\97\a8\5a\3ad933f15ee204c8c70e78bfb11a62cb578aa96320b6ee2ca8\tablib-0.14.0-py2-none-any.whl Collecting urllib3 Using cached urllib3-1.26.8-py2.py3-none-any.whl (138 kB) Collecting certifi Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB) Collecting chardet<3.1.0,>=3.0.2 Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB) Collecting idna<2.9,>=2.5 Using cached idna-2.8-py2.py3-none-any.whl (58 kB) Collecting bleach Using cached bleach-3.3.1-py2.py3-none-any.whl (146 kB) Collecting pymdown-extensions Using cached pymdown_extensions-8.0-py2.py3-none-any.whl (206 kB) Collecting backports.csv; python_version < "3.0" Using cached backports.csv-1.0.7-py2.py3-none-any.whl (12 kB) Collecting xlrd Using cached xlrd-2.0.1-py2.py3-none-any.whl (96 kB) Collecting xlwt Using cached xlwt-1.3.0-py2.py3-none-any.whl (99 kB) Collecting pyyaml Using cached PyYAML-5.4.1-cp27-cp27m-win_amd64.whl (204 kB) Processing c:\users\nepapa david\appdata\local\pip\cache\wheels\a1\bf\e9\51b62ccd5a4772b7c00fa648dc0bd39811911c667acba2a4bb\markuppy-1.14-py2-none-any.whl Processing c:\users\nepapa david\appdata\local\pip\cache\wheels\98\c4\95\b0df24ec6db20e710d841be844de5f7f5df8491c1e5fb91323\odfpy-1.4.1-py2.py3-none-any.whl Collecting webencodings Using cached webencodings-0.5.1-py2.py3-none-any.whl (11 kB) Collecting packaging Using cached packag
Re: Pickle file and send via socket
On Wednesday, August 8, 2012 at 8:37:33 PM UTC+5:30, lipska the kat wrote: > On 08/08/12 14:50, S.B wrote: > > On Wednesday, August 8, 2012 3:48:43 PM UTC+3, lipska the kat wrote: > >> On 06/08/12 14:32, S.B wrote: > >> > [snip] > > Thank you so much ! > > The examples are very helpful. > > What happens if I have a regular text file I want to send via the network. > > Do I need to read the file and then dump it into the "stargate" file object? > Well according to the documentation at > > http://docs.python.org/py3k/tutorial/inputoutput.html#reading-and-writing-files > > > it should be straightforward to read and write pickled files > Not sure why you want to pickle a text file over the network when you > could just stream it between ports ! > > however ... > > I'm currently getting a Unicode decode error on the first byte in the > stream when it gets to the other end, no idea why so I guess I have to > continue searching, read the documentation above and see if you can > figure it out, that's what I'm doing. > lipska > > -- > Lipska the Kat: Troll hunter, sandbox destroyer > and farscape dreamer of Aeryn Sun Directly read bytes from file and send it over the socket object from client side in while loop until all content from file is read. Something like this. Client side import socket s = socket.socket() PORT = 9898 s.connect(("192.168.0.101",PORT)) file = open("turnover.csv","rb") SendData = file.read(1024) while SendData: s.send(SendData) SendData = file.read(1024) s.close() Server side import socket s = socket.socket() PORT =9898 print("Server is listening on port :",PORT,"\n") s.bind(("192.168.0.101",PORT)) s.listen(10) file = open("recv.csv","wb") print("\n Copied file name will be recv.txt at server side\n") while True: conn,addr = s.accept() RecvData = conn.recv(1024) while RecvData: file.write(RecvData) RecvData = conn.recv(1024) file.close() print("\n File has been copied successfully \n") conn.close() print("\n Server is closing the connection \n") break -- https://mail.python.org/mailman/listinfo/python-list
Re: Pickle file and send via socket
On Sat, 19 Feb 2022 at 05:47, UTKARSH PANDEY wrote: > > On Wednesday, August 8, 2012 at 8:37:33 PM UTC+5:30, lipska the kat wrote: > > ... > Directly read bytes from file and send it over the socket object from client > side in while loop until all content from file is read. > Almost ten years. Quite an impressive ping time. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: Error installing requirements
And the question is? On 2/18/22 00:23, Saruni David wrote: > PS C:\Users\Nepapa David\cpims_api> pip install -r requirements/base.txt > DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. > Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 > will drop support > for Python 2.7 in January 2021. More details about Python 2 support in pip > can be found at > https://pip.pypa.io/en/latest/development/release-process/#python-2-suppor > t pip 21.0 will remove support for this functionality. By using Python 2.7 you're constrained to very old versions of things. > Collecting pillow==3.3.2 > Using cached Pillow-3.3.2.tar.gz (10.6 MB) And for this one, there was no binary wheel found, apparently, so it fetched (or in this case used from cache) the source distribution instead (a VERY old version, Pillow is on 9.0 these days). So now the source distribution has to be compiled. pip tries to arrange that for you, but that often fails on Windows, unless you have all the requirements set up just right. > Building wheels for collected packages: pillow > Building wheel for pillow (setup.py) ... error > ERROR: Command errored out with exit status 1: ... and so it did. > File > "c:\users\nepapa~1\appdata\local\temp\pip-install-fu6_er\pillow\setup.py", > line 521, in build_extensions > ' using --disable-%s, aborting' % (f, f)) > ValueError: zlib is required unless explicitly disabled using > --disable-zlib, aborting > > ERROR: Failed building wheel for pillow And at least one of the reasons is a missing build requirement (there may be other lurking problems that you just haven't uncovered yet because it stopped on that one). Fix, and retry. Or... maybe try using something more modern? It's not usually necessary to compile Pillow, usually binary wheels are available and you avoid that problem. -- https://mail.python.org/mailman/listinfo/python-list