Problem with Python modules import on Mac

你。 提交于 2021-02-11 13:33:00

问题


I've tried tried to install several modules for Python with "pip install <module_name>" command. But I still cannot get how it works. I'am able to use only pygame module, which has been installed with sudo easy_install ("pip install" didn't work). Then I've tried to install another, Eel module and I have got strange results. The Eel module is shown in the Terminal list 1 (I'm working on the latest Catalina) but python (in Pycharm IDE) can't read eel as installed module 2.

I suppose, it's sort of problem with python or pip versions (but pypi suggests to install the Eel module with "pip install" command -- https://pypi.org/project/Eel/)

I'll be very grateful to get your answer -) P.S. I've checked cases and other spelling stuff=) I mean that module for python should be named eel but officially called Eel (according to the naming on the pypi page https://pypi.org/project/Eel/)


回答1:


The issue might be that you don't have pip installed.

I know most Mac's have pip and Python pre-installed, but it wouldn't hurt to try: sudo easy_install pip

If this doesn't seem to be the issue, you might be running the pip install packageName in the wrong directory.

You will need to access your scripts folder in python and run the pip install packageName command in there. Here is a resource which should help you reach that directory: https://datatofish.com/install-package-python-using-pip/



来源:https://stackoverflow.com/questions/63412747/problem-with-python-modules-import-on-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!