pythonpath Questions

18

I have two versions of python 2.7 and 3.4 and installed django through pip. it shows in ubuntu terminal: $ pip freeze Django==1.6.11 $ pip --version pip 1.5.4 from /usr/lib/python2.7/dist-packages...
Eluvium asked 3/2, 2016 at 18:7

33

Solved

Ok, I see plenty of these errors around. I have tried everything I know to do and have yet to figure this out. I am working on a development server running python 2.5 and Django 1.3. Django 1.3 wa...
Dispensable asked 18/5, 2011 at 19:21

6

Solved

I am trying to import a module from a particular directory. The problem is that if I use sys.path.append(mod_directory) to append the path and then open the python interpreter, the directory mod_...
Comfortable asked 19/4, 2013 at 22:27

5

Let's say I have the following directory structure: parent_dir/ foo_dir/ foo.py bar_dir/ bar.py If I wanted to import bar.py from within foo.py, how would I do that?
Titi asked 22/4, 2012 at 22:57

1

I have Python 3.8.10 64bit(win10) installed. I'm using it with VSC. Also for c/c++ I have installed mingw64. Mingw64 installs a python version to, dont know why and for what, but it is already maki...
Staff asked 23/3, 2022 at 9:23

4

Solved

I am on ubuntu 13.04, bash, python2.7.4 The interpreter doesn't see variables I set. Here is an example: $ echo $A 5 $ python -c 'import os; print os.getenv( "A" )' None $ python -c 'import os; ...
Punishment asked 28/9, 2013 at 19:2

35

I'm running PyLint from inside Wing IDE on Windows. I have a sub-directory (package) in my project and inside the package I import a module from the top level, ie. __init__.py myapp.py one.py subd...
Infelicitous asked 14/12, 2009 at 7:22

4

Solved

I have a Python project consisting of a Jupyter notebook, several scripts in a bin directory and modules in a src directory, with dependencies in a Pipfile: myproject ├── myproject.ipynb ├── Pipfi...
Authenticity asked 6/4, 2018 at 18:45

4

I'm trying to add the src folder to my PYTHONPATH i.E. do the same thing as Mark directory as sources root in PyCharm. I've looked at the solutions to Visual Studio Code - How to add multiple path...
Trinitrotoluene asked 22/2, 2020 at 17:44

14

Solved

I'm trying to create a virtualenv with virtualenvwrapper, but when I use mkvirtualenv I get the following : ERROR: virtualenvwrapper could not find virtualenv in your path I assumed it was a PYT...
Debunk asked 7/7, 2015 at 16:44

24

Solved

I have a directory which hosts all of my Django apps (C:\My_Projects). I want to add this directory to my PYTHONPATH so I can call the apps directly. I tried adding C:\My_Projects\; to my Wi...
Chlordane asked 13/9, 2010 at 15:4

4

Solved

I need to create a windows batch script which creates and moves one specific file to PYTHONPATH\Lib\distutils folder. Here is what I am attempting to do: ECHO [build] >> distutils.cfg ECHO ...
Taal asked 5/1, 2016 at 18:58

7

Solved

I want to run: python somescript.py somecommand But, when I run this I need PYTHONPATH to include a certain directory. I can't just add it to my environment variables because the directory I wan...
Charleencharlemagne asked 2/1, 2011 at 19:33

6

I am trying to customising my Apache Superset. I am not very familiar with Terminal. On the documentation it is written: "To configure your application, you need to create a file (module) supe...
Rese asked 5/12, 2019 at 12:38

8

Solved

I thought import sys sys.path.append("/home/me/mydir") is appending a dir to my pythonpath if I print sys.path my dir is in there. Then I open a new command and it is not there anymore. But s...
Kopaz asked 2/8, 2010 at 12:23

6

I want to be able to use the paraview.simple library in PyCharm. I already have paraview installed in my computer. This package cannot be installed with pip and there are no .whl files as far as I ...
Bursiform asked 23/2, 2018 at 12:5

1

Solved

The docs for sys.path state the following: A list of strings that specifies the search path for modules. Initialized from the environment variable PYTHONPATH, plus an installation-dependent defaul...
Firn asked 6/5, 2023 at 10:9

2

Solved

I have a fairly large python/c++ program that runs as follow: . set_env.sh -option A -option B python run.py The set_env.sh script modifies the PYTHONPATH and does all sort of export in order to ...

3

I'm using Visual Studio 1.39.2 on Windows 10. I'm very happy that you can run Jupyter Notebook natively through VS Code as of October this year (2019), but one thing I don't get right is how to set...
Christcross asked 6/11, 2019 at 17:7

9

Solved

I am using centos linux. I had python 2.6 with django and now i upgraded to python 2.7. Python 2.6 is located in /usr/lib/python2.6. Python 2.7 is located in /usr/local/lib/python2.7. They both ha...
Translucent asked 27/2, 2012 at 8:48

24

Solved

Whenever I use sys.path.append, the new directory will be added. However, once I close python, the list will revert to the previous (default?) values. How do I permanently add a directory to PYTHON...
Fortney asked 4/8, 2010 at 2:28

13

Solved

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 ...
Sherbrooke asked 6/12, 2018 at 14:0

4

I have been trying to fix the python path on my cpu, and I originally was just trying to change my .bash_profile, but that wasn't working, so I used import sys sys.pat.append(path/To/Module) and n...
Nifty asked 23/6, 2016 at 17:14

2

Solved

I am working on a python package with VS Code with the following layout of the opened workspace folder in VS Code workspace | + tests | | - test1.py | | + other_tests | | | - test2.py | + mymodule...
Hydroxide asked 21/6, 2022 at 20:59

7

In Jupyter my own little module is not loaded but in python/bpython is everything is fine. When typing import sys print(sys.path) the path to my module will not in show in Jupyter but in python/...
Japonica asked 24/1, 2016 at 14:12

© 2022 - 2025 — McMap. All rights reserved.