• Register
0 votes
197 views

Problem :

I am usually installing the python packages through the pip.

For my Google App Engine, I need to install the packages to another target directory.

I have already tried below command :

pip install -I flask-restful --target ./lib

But it is failing with below error:

“Must supply either home or prefix/exec-prefix -- not both”

How can I get my App to work?

7.5k points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

I believe there is the simpler solution to your problem the Homebrew's Python on macOS that definitely will not break your normal pip operations.

All you need to do is to just create the setup.cfg file at your root directory of the project, usually where the main __init__.py or executable py file is present. So if your root folder of the project is: /path/to/my/project/ then simply create the setup.cfg file in there and put your magic words inside as below :

[install]
prefix=  

Now you will be able to run your pip's commands for that folder as below:

pip install package -t /path/to/my/project/  

The command will run error free for that folder only. Just copy your setup.cfg to the other projects that you might have. And no need to write the .pydistutils.cfg on the home directory.

After you are done with installing your modules, you can safely remove setup.cfg.

38.6k points

Related questions

0 votes
1 answer 13 views
13 views
Problem : Hi, Is there a way to solve it: Distutilsoptionerror: must supply either home or prefix/exec-prefix -- not both?
asked Jun 14 Siam55 110k points
0 votes
1 answer 80 views
80 views
PROBLEM : Someone help me to fix this Please on > 'pip install could not find a version that satisfies the requirement' ?
asked Mar 16 Samiur1 38.6k points
0 votes
1 answer 4 views
4 views
Problem: It’s a heavy issue on behalf of me, will anyone simplify : An entity identifier can be either unique or nonunique.
asked Jun 25 asha 121k points
0 votes
1 answer 6 views
6 views
Problem: Your client has issued a malformed or illegal request.
asked Jun 26 Rada Gracelynn 104k points
0 votes
1 answer 10 views
10 views
Problem: Can anyone simplify this : Your client has issued a malformed or illegal request.?
asked Jun 26 Sawyer Parviz 168k points
0 votes
1 answer 10 views
10 views
Problem: What should I do when my has issued a malformed or illegal request google ?
asked Jun 22 Diederich Raf 120k points
0 votes
1 answer 4 views
4 views
Problem: Is there a way to fix this : Your client has issued a malformed or illegal request youtube?
asked Jun 22 Florina Gulnar 106k points
0 votes
1 answer 5 views
5 views
Problem: What is wrong here : Your client has issued a malformed or illegal request. youtube?
asked Jun 21 Chi Omega 168k points
0 votes
1 answer 9 views
9 views
Problem: What exactly is the solution : 400. that’s an error. your client has issued a malformed or illegal request?
asked Jun 15 Nahil 128k points
0 votes
1 answer 15 views
15 views
Problem: What am I going to do about it : Syntax error, annotations are only available if source level is 1.5 or greater?
asked Jun 14 Nahil 128k points