Mac Python pointing to different site-packages after python upgrade - How do i point all site-packages to correct python
Date : March 29 2020, 07:55 AM
Hope that helps From the evidence you present, it appears you have both of the framework bin directories of Python 2.6 and Python 2.7 on your shell search path, $PATH. If you used the python.org installers to install both 2.6 and 2.7, each installer by default modifies your shell startup files to include the bin directory it installed on $PATH. For example: $ more ~/.bash_profile
[...]
# Setting PATH for MacPython 2.6
# The orginal version is saved in .profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.6/bin:${PATH}"
export PATH
# Setting PATH for Python 2.7
# The orginal version is saved in .profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
$ echo $PATH
/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
$ cd /Library/Frameworks/Python.framework/Versions/2.6/bin
$ ln -s yolk yolk2.6
$ cd /Library/Frameworks/Python.framework/Versions/2.7/bin
$ ln -s yolk yolk2.7
$ which yolk2.6
/Library/Frameworks/Python.framework/Versions/2.6/bin/yolk2.6
$ which yolk2.7
/Library/Frameworks/Python.framework/Versions/2.7/bin/yolk2.7
|
How I will know what pip packages need my python project and how to list what I already use in my project
Date : March 29 2020, 07:55 AM
may help you . What you are looking for are requirements files. https://pip.pypa.io/en/stable/user_guide/#requirements-files$ pip freeze
no packages installed
$ pip install requests
$ pip freeze
certifi==2017.4.17
chardet==3.0.4
idna==2.5
requests==2.18.1
urllib3==1.21.1
# This is the contests of requirements.txt
requests>=2.18.1,<3.0.0
|
Python: Packages that are not relevant for project
Date : March 29 2020, 07:55 AM
will be helpful for those in need What we do here: First we have the project's requirement file - the one used for deployments. This is not built using pip freeze but manually edited so it only contains relevant packages.
|
Get all modules/packages used by a python project
Tag : python , By : user121350
Date : March 29 2020, 07:55 AM
|
Find all python packages in project
Date : March 29 2020, 07:55 AM
|