Code Monkey home page Code Monkey logo

osx-python-pip-problems's Introduction

python pip pipenv mac

Fix for problems with Python and pip

Open Source Love Gitter Chat MIT Licence

Problem

Today i run in some weird issues installing some tools that after the dependencies where installed the i got error messages that they would not be there. Running direct the Python Shell showed me that its working fine.

After a bit research i found out that Mac have an own Python version and stuff get then mixed up with the version from homebrew. Thought beeing smart and drop an alias got it did not solve the problem since mostly run in the scripts via Shebang.

The fix is to install a tool called pipenv for isolationg them from each other (similar like nvm for Node.js).

To see how many Python versions are installed run type -a python.

Let's fix it

Install pipenv

pip install --user pipenv

Update PATH Variable

Add this folder before $PATH echo "$(python -m site --user-base)/bin"

How to use it

Go to your Folder

cd myproject

Install request

pipenv install requests

remember to use always pipenv instead of pip from now!

Execute the App

Starting it like before e.g. ./app.py won't work, you have to run it as well with pipenv run python app.py

Thats it.

Hope i can save others in the future with this tipps some time.

Contact

GithubDockernpmTwitterFacebookGoogle+Gitter

License

MIT license

This work by Maik Ellerbrock is licensed under a Creative Commons Attribution 4.0 International License and the underlying source code is licensed under the MIT license.

osx-python-pip-problems's People

Contributors

ellerbrock avatar

Watchers

 avatar  avatar

osx-python-pip-problems's Issues

pip3 install not working for cairosvg

Hi all,

I have been trying to install cairosvg using the "pip3 install cairosvg" command.

I always get the error term

"python setup.py egg_info" failed with error code 1 in

and then depending on whether I had run it with sudo powers or not, I get listed the folders

/private/tmp/pip-build-19ynye6w/cairocffi/ (for sudo)

or

/private/var/folders/z8/0m4tj0x14yb75l37vybt1zx00000gp/T/pip-build-zc8buluu/cairocffi/ (for non sudo)

I have tried everything from updating the pip3 setuptools to installing brew and trying to install cairosvg that way.
What would you recommend?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.