Posts

Showing posts with the label pip

How to create a requirements.txt for python

First, you must to detect every python package that you need to your proyect. An option is to use the following sentence: grep import file_name.py Now, you need to create a file called requirements.in with every package per line as: julia networkx To finalize, the version of each package must be included in the file. To do it, just use: pip-compile requirements.in  The file requirements.txt was created.  To run it in other environment, execute the following sentence: pip install -r requirement.txt Enjoy it!

AttributeError: module 'lib' has no attribute 'SSL_ST_INIT'

I wanted to upgrade pip but I couldn't by the following error: sudo pip install --upgrade pip  Traceback (most recent call last):   File "/usr/local/bin/pip", line 7, in <module>     from pip._internal import main   File "/usr/local/lib/python3.5/dist-packages/pip/_internal/__init__.py", line 42, in <module>     from pip._internal import cmdoptions   File "/usr/local/lib/python3.5/dist-packages/pip/_internal/cmdoptions.py", line 16, in <module>     from pip._internal.index import (   File "/usr/local/lib/python3.5/dist-packages/pip/_internal/index.py", line 14, in <module>     from pip._vendor import html5lib, requests, six   File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/requests/__init__.py", line 97, in <module>     from pip._vendor.urllib3.contrib import pyopenssl   File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/urllib3/co...