pip

Src layout to dispense .src prefix in imports? Activate venv in PyCharm terminal for development installs

隐身守侯 提交于 2020-06-29 03:13:17
问题 I want to understand what is considered the correct minimalist way to use setuptools with a "src/ layout" in a way that dispenses using src. prefix in imports? I have read most of the PyPA and setuptools documentation (and its many use cases), but I can't understand what is considered the correct way of doing this example. The below layout reproduces what I want to achieve. I can't understand how to get the second import to work instead of the first across all modules of the mylibrary package

Src layout to dispense .src prefix in imports? Activate venv in PyCharm terminal for development installs

本秂侑毒 提交于 2020-06-29 03:13:09
问题 I want to understand what is considered the correct minimalist way to use setuptools with a "src/ layout" in a way that dispenses using src. prefix in imports? I have read most of the PyPA and setuptools documentation (and its many use cases), but I can't understand what is considered the correct way of doing this example. The below layout reproduces what I want to achieve. I can't understand how to get the second import to work instead of the first across all modules of the mylibrary package

Why 'sudo pip install' if 'pip install' works? (Issues with HelloAnalytics.py)

二次信任 提交于 2020-06-27 16:43:26
问题 Google provides a sample HelloAnalytics.py to demonstrate the use of google-api-python-client. Below the heading "2. Install the client library" they write: Use pip, the recommended tool for installing Python packages: sudo pip install --upgrade google-api-python-client I wonder why I should use sudo while a simple pip (without sudo ) seems to work perfectly (on my Mac): % pip install google-api-python-client Collecting google-api-python-client Using cached google_api_python_client-1.9.3-py3

Why is the PYTHONPATH different when running Python with and without sudo?

好久不见. 提交于 2020-06-27 14:45:07
问题 There's something wrong with my OSX system and python that no amount of googling has fixed. I've uninstalled all traces of python except the system python package with OSX that I'm not supposed to uninstall, and then started afresh with a new python from python.org, and installed pip. Now...not sure if this particular behavior below is part of the issue, but it seems strange to me: I ran python twice. Once with sudo and once without. Without sudo, I can't access pip. What's going on? $ sudo

Why is the PYTHONPATH different when running Python with and without sudo?

风格不统一 提交于 2020-06-27 14:44:30
问题 There's something wrong with my OSX system and python that no amount of googling has fixed. I've uninstalled all traces of python except the system python package with OSX that I'm not supposed to uninstall, and then started afresh with a new python from python.org, and installed pip. Now...not sure if this particular behavior below is part of the issue, but it seems strange to me: I ran python twice. Once with sudo and once without. Without sudo, I can't access pip. What's going on? $ sudo

Refresh pip installed packages

限于喜欢 提交于 2020-06-27 11:49:05
问题 I am doing an installation script that does a complete installation of a software with it's needed modules on an Ubuntu server where i import the pip module then check for installed packages then install what i need then i check for them again. The problem is when i install the new packages changes are not reflected to the imported pip module in the same run. I am using: import pip pip.get_installed_distributions() so i want to know is there any way that i could possibly clear pip cache or

Add a custom wheel file as a dependency in setup.py?

大憨熊 提交于 2020-06-27 07:40:55
问题 I'm working on a project where one of the dependencies is actually a .whl that isn't on pypi (i.e. I had to download the wheel direct from the author and pip install it directly). In my setup.py file, is there a way to do something like: install_requires=[ 'library.whl', 'matplotlib==2.2.2', 'numpy==1.14.2', 'opencv-python==3.4.0.12', 'Pillow==5.1.0', 'PyYAML==3.12', ], Or something along these lines since its not on pypi (and I would just add the library.whl in the MANIFEST.in file or

biopython no module named Bio

a 夏天 提交于 2020-06-27 06:49:11
问题 FYI: this is NOT a duplicate! Before running my python code I installed biopython in the cmd prompt: pip install biopython I then get an error saying 'No module named Bio' when try to import it in python import Bio The same thing happens with import biopython It should be noted I have updated PIP and run python 3.5.2 I appreciate anyone's help. 回答1: use this: pip3 install biopython and then import Bio worked for me 回答2: When I came across this problem I noticed that after I installed

“E: Unable to locate package python-pip” on Ubuntu 18.04

笑着哭i 提交于 2020-06-25 10:52:08
问题 I am trying to install virtualenv on Ubuntu. First it said command 'pip' not found , so I typed sudo apt install python-pip then it said E: Unable to locate package python-pip I tried to reset WSL, download using cmd but it doesn't work with Ubuntu. I don't know why. Even though I have downloaded python3, virtualenv, and pip using cmd. It doesn't work with Ubuntu 18.04. It also fails on Ubuntu 14.04. aiki@LAPTOP-886AEJJG:~$ pip Command 'pip' not found, but can be installed with: sudo apt

Python: Installed a local package with pip3, but got module not found error

送分小仙女□ 提交于 2020-06-25 10:29:04
问题 Procedure: I strictly followed the instructions here: https://python-packaging.readthedocs.io/en/latest/minimal.html Except that I used the pip3 install -e . Error: It still can not find the module: python3 Python 3.6.5 (default, Apr 25 2018, 14:26:36) import funniest Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'funniest' However, when I import the module in python , it CAN find it: python Python 2.7.10 (default, Feb 7 2017, 00