pythonpath

Provide temporary PYTHONPATH on the commandline?

為{幸葍}努か 提交于 2020-08-24 15:27:21
问题 I'm thinking of something like python3 my_script.py --pythonpath /path/to/some/necessary/modules Is there something like this? I know (I think) that Pycharm temporarily modifies PYTHONPATH when you use it to execute scripts; how does Pycharm do it? Reasons I want to do this (you don't really need to read the following) The reason I want to do this is that I have some code that usually needs to run on my own machine (which is fine because I use Pycharm to run it) but sometimes needs to run on

How to correctly set PYTHONPATH for Visual Studio Code

你。 提交于 2020-06-24 05:06:08
问题 How do I correctly set up the $PYTHONPATH variable for my workspace in VisualStudio Code? Background Information I have installed two versions of GNURadio: GNURadio version 3.7.11 installed by the Linux Mint package manager in /usr/lib/python2.7/dist-packages/gnuradio GNURadio version 3.7.13.4 installed by PyBOMBS in /home/tejul/Documents/gr13/default/lib/python2.7/dist-packages/gnuradio (my prefix directory is ~/Documents/gr13/default ) I can use the newer version of GNURadio version only

How to set paths while scraping data from website

女生的网名这么多〃 提交于 2020-03-26 03:53:26
问题 I am scraping data from this URL. This is my code: from selenium import webdriver import os import time chrome_driver = os.path.abspath(os.path.dirname(__file__)) + '/chromedriver' browser = webdriver.Chrome(chrome_driver) browser.get("https://angel.co/companies?locations[]=1688-United+States") time.sleep(3) data_row = browser.find_elements_by_class_name('base.startup') for item in data_row: print('-'*100) company = item.find_element_by_class_name('name').text location = item.find_element_by

Python packages with conflicting dependencies

耗尽温柔 提交于 2020-03-03 04:52:41
问题 we are trying to install several own written python3 applications sharing some libraries with conflicting versions. We are currently discussing employing the order of packages inside the PYTHONPATH and/ or pythons virtualenv. How would you handle this? 回答1: You can use pipx. pipx will do all the work of setting up separate virtual environments for each application, so that all the applications' dependencies remain separate. If you use virtualenv yourself, you have to switch environments to

Python packages with conflicting dependencies

送分小仙女□ 提交于 2020-03-03 04:51:47
问题 we are trying to install several own written python3 applications sharing some libraries with conflicting versions. We are currently discussing employing the order of packages inside the PYTHONPATH and/ or pythons virtualenv. How would you handle this? 回答1: You can use pipx. pipx will do all the work of setting up separate virtual environments for each application, so that all the applications' dependencies remain separate. If you use virtualenv yourself, you have to switch environments to

Python packages with conflicting dependencies

不打扰是莪最后的温柔 提交于 2020-03-03 04:51:45
问题 we are trying to install several own written python3 applications sharing some libraries with conflicting versions. We are currently discussing employing the order of packages inside the PYTHONPATH and/ or pythons virtualenv. How would you handle this? 回答1: You can use pipx. pipx will do all the work of setting up separate virtual environments for each application, so that all the applications' dependencies remain separate. If you use virtualenv yourself, you have to switch environments to

Windows 10 Bash and python paths

ⅰ亾dé卋堺 提交于 2020-02-02 11:11:06
问题 I've recently installed the windows bash. I tryed to make the packages installed with Anaconda visible by adding them to the PYTHONPATH variable but it is not listed in the environment. Couriously enough sys.path.append works just fine and has entries, as sys.path doc states that the package variable is instatiated from the environment variable PYTHONPATH, but how can it be if it is not present in the environment (Bash of windows)? I've already checked the windows environment and they're as

Module name different than directory name?

丶灬走出姿态 提交于 2020-02-01 14:32:30
问题 Let's assume I have a python package called bestpackage . Convention dictates that bestpacakge would also be a directory on sys.path that contains an __init__.py to make the interpreter assume it can be imported from. Is there any way I can set a variable for the package name so the directory could be named something different than the directive I import it with? Is there any way to make the namespacing not care about the directory name and honor some other config instead? My super trendy

python, change user site directory or install setup.py --prefix with --user

僤鯓⒐⒋嵵緔 提交于 2020-02-01 04:35:25
问题 I'd want to install python modules as non-root user like this $ pip install -I --install-option="--prefix=~/usr" scipy Unfortunately this usually does not work unless you specify --user . But --user can't be used together with --prefix . Using --user only (without --prefix ) installs to ~/.local which I find ugly because I have a well maintained ~/usr and don't want to add even more stuff to my env to make ~/.local usable too. So my questions: How can I let --prefix and --user work together

Aptana Python stdlib issue with virtualenv

橙三吉。 提交于 2020-01-30 10:35:04
问题 I recently started working on a project using just vim as my text editor with a virtualenv setup. I installed a few API's on this virtualenv from GitHub. Eventually, the project got a little bigger than vim could handle so I had to move the project to an IDE. I chose Aptana Studio 3. When I started up Aptana, I pointed the project directory to the virtualenv folder that I had created to house my project. I then pointed the interpreter at the Python executable in App/bin (created from