Question

How do I set the Pythonpath in Mac in order to be able to download new...

How do I set the Pythonpath in Mac in order to be able to download new modules/packages? Please provide all steps and a very detailed example and explanation because I've never worked with Terminal windows before.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The PYTHONPATH variable has a value that is a string with a list of directories that Python should add to the sys.path directory list.

The main use of PYTHONPATH is when we are developing some code that we want to be able to import from Python, but that we have not yet made into an installable Python package

For MAC:-

  • Open the file ~/.bash_profile in your text editor – e.g. atom ~/.bash_profile;

  • Add the following line to the end:

    export PYTHONPATH="/Users/my_user/code"
    
  • Save the file.

  • Close Terminal.app;

  • Start Terminal.app again, to read in the new settings, and type this:

    echo $PYTHONPATH
    

    It should show something like /Users/my_user/code.

OR

Step 1

Open the shell script that runs every time you access your terminal in a text editor.

In Mac OS X environments, the file is called ".profile."

Step 2

Type:

PYTHONPATH = "$ {PYTHONPATH} : /path/where/python/package/is/located/ export PYTHONPATH

For Mac OS X a typical path is "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages".

Step 3

Save the file. Changes to your path will take effect when you start a new shell.

Add a comment
Know the answer?
Add Answer to:
How do I set the Pythonpath in Mac in order to be able to download new...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • how do I know if a compound is a base or an acid just by looking...

    how do I know if a compound is a base or an acid just by looking at its formula? i know how to determine acid and bases based on the whole equation, but it is hard to know just by looking at the compound, for example, Hco3, is it a base or an acid and how do we know, are there steps I can use? please give me examples with the explanation when I look at the formula for Hco3,...

  • how would i do subdirectory because i want to be able to grab all subdirectory out...

    how would i do subdirectory because i want to be able to grab all subdirectory out of a directory and still be able to get add them I have a subdirectory called testFolder in it contains the following: defaulfolder.1 defaultfolder defaultfolder2.1 defaultfolder2 I only want to be able to grab the default folder without the "." i would like to get a test output of the answers import java.io.File; import java.util.ArrayList; import java.util.List; public class checkFile { private List<File> tests;...

  • . Long on to a PC with the administrator account, or an account that has administrator privilege....

    . Long on to a PC with the administrator account, or an account that has administrator privilege. Please take a note of your system information and location where you perform the lab. Open the command prompt. For Windows 10, type cmd in Cortona. For Windows XP. choose Start à Run, and type cmd in the Open field. For Windows 7, click on Start, enter cmd in "Search program and file, and choose "cmd.exe from search result. For Windows 8 press...

  • ne of my current job is working as Wheeled Mechanic for the National Guard. I have...

    ne of my current job is working as Wheeled Mechanic for the National Guard. I have never worked as a mechanic in my civilian life but I do like working on fixing things around the house. As a result, I decided to work as a mechanic for the Army National Guard.    The job characteristic model has five different area. In reference to my job as wheeled mechanic and applying the skill variety, which is the skills and activities needed...

  • Please help with this problem I am new to circuits and capacitors and do not understand....

    Please help with this problem I am new to circuits and capacitors and do not understand. When working out please write all formulas used and the steps took and why so I can learn as I follow along why you did what. Also, make sure to plot on a graph as well as the voltage goes to 0 over a time period ****Please do not turn in Laplace domain. Use tools that are basic so I can better understand Problem...

  • I've got 1-5 done, but I have read this chapter up and down and can't find...

    I've got 1-5 done, but I have read this chapter up and down and can't find the rest of the answers. Any help would be awesome, thank you. EVIEWING THE BASICS REV four major functions of an OS 1. List four Which app do you use on the Windows 8 Start screen to install new apps? What might happen to the Windows system if too many services are running as indicated by multiple icons in the norification area of the...

  • can i please get help on this? i don't know how to do it and I'm...

    can i please get help on this? i don't know how to do it and I'm so confused. This is in java. This is what I need to do. Thank you so much. In this lab assignment, you are to write a class IntegerSet that represents a set of integers (by definition, a set contains no duplicates). This ADT must be implemented as a singly linked list of integers (with no tail reference and no dummy head node) , but...

  • hi, please help in c++. I dont understand how to do this, and a lot of...

    hi, please help in c++. I dont understand how to do this, and a lot of the ways on the internet is confusing me, i am a beginner. with all steps and explantions, will rate! Write a program that determines the frequency of each char in an input file. Your program should . read in an unknown number of chars from an input file named input.txt, • using a function written by you, determine the frequency of occurrence of each...

  • Hello! I have this python Homework due tonight that I don't know how to do. Here...

    Hello! I have this python Homework due tonight that I don't know how to do. Here is a document with the data in the csv file, as I didn't know how to share it https://docs.google.com/document/d/1bDJVR2MqWKInvw5u0r3fOG3-CBmu3BEiPZwlaq_CShQ/edit?usp=sharing Activity #3: On the class website is a CSV file containing weather data from Coulter Field (in Bryan) for 3 years (1 day is missing for some reason!); the data was taken from Weather Underground (wunderground.com). There are different versions of the file for Windows...

  • I do not understand how to answer part c. If you could please provide the work...

    I do not understand how to answer part c. If you could please provide the work to solve for the answer that would be great, thanks! Use the worked example above to help you solve this problem. (a) Calculate the resistance per unit length of a 44 gauge nichrome wire of radius 0.642 mm. 1.16 (b) If a potential difference of 11.6 V is maintained across a 1.00 m length of wire, what is the current in the wire? 10...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT