Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have this issue? import sc2 ImportError: No module named 'sc2' #122

Open
christojet opened this issue Aug 20, 2018 · 6 comments
Open

I have this issue? import sc2 ImportError: No module named 'sc2' #122

christojet opened this issue Aug 20, 2018 · 6 comments

Comments

@christojet
Copy link

No description provided.

@BurnySc2
Copy link
Collaborator

We need more info. Can you tell us your installation process? How did you install the python-sc2 library?

@christojet
Copy link
Author

christojet commented Aug 22, 2018

I install python 3.6 with Anaconda and i was using PowerShell. Now i use the Anaconda prompt and everything is going well.

@organicnz
Copy link

organicnz commented Sep 6, 2018

I've received the same issue. Might it have been caused by the installation of the sc2 package to python3.6 for any reason?

Organic:~ organic$ brew switch python
Error: Usage: brew switch <formula> <version>
python installed versions: 3.7.0
Organic:~ organic$ pip3 install --user --upgrade sc2
Requirement already up-to-date: sc2 in ./.local/lib/python3.6/site-packages (0.9.0)
Requirement already satisfied, skipping upgrade: async-timeout<4.0,>=3.0 in ./.local/lib/python3.6/site-packages (from sc2) (3.0.0)
Requirement already satisfied, skipping upgrade: s2clientprotocol in ./.local/lib/python3.6/site-packages (from sc2) (4.6.0.67926.0)
Requirement already satisfied, skipping upgrade: portpicker in ./.local/lib/python3.6/site-packages (from sc2) (1.2.0)
Requirement already satisfied, skipping upgrade: aiohttp in ./.local/lib/python3.6/site-packages (from sc2) (3.4.4)
Requirement already satisfied, skipping upgrade: protobuf in /anaconda3/lib/python3.6/site-packages (from s2clientprotocol->sc2) (3.6.1)
Requirement already satisfied, skipping upgrade: attrs>=17.3.0 in /anaconda3/lib/python3.6/site-packages (from aiohttp->sc2) (18.1.0)
Requirement already satisfied, skipping upgrade: idna-ssl>=1.0; python_version < "3.7" in ./.local/lib/python3.6/site-packages (from aiohttp->sc2) (1.1.0)
Requirement already satisfied, skipping upgrade: multidict<5.0,>=4.0 in ./.local/lib/python3.6/site-packages (from aiohttp->sc2) (4.4.0)
Requirement already satisfied, skipping upgrade: chardet<4.0,>=2.0 in /anaconda3/lib/python3.6/site-packages (from aiohttp->sc2) (3.0.4)
Requirement already satisfied, skipping upgrade: yarl<2.0,>=1.0 in ./.local/lib/python3.6/site-packages (from aiohttp->sc2) (1.2.6)
Requirement already satisfied, skipping upgrade: six>=1.9 in /anaconda3/lib/python3.6/site-packages (from protobuf->s2clientprotocol->sc2) (1.11.0)
Requirement already satisfied, skipping upgrade: setuptools in /anaconda3/lib/python3.6/site-packages (from protobuf->s2clientprotocol->sc2) (40.2.0)
Requirement already satisfied, skipping upgrade: idna>=2.0 in /anaconda3/lib/python3.6/site-packages (from idna-ssl>=1.0; python_version < "3.7"->aiohttp->sc2) (2.6)
Organic:~ organic$ pip3 --version
pip 18.0 from /anaconda3/lib/python3.6/site-packages/pip (python 3.6)
Organic:starcraft organic$ /usr/local/opt/python/bin/python3.7 /Users/organic/Development/Python/starcraft/pythonstarcrafttutorial.py
Traceback (most recent call last):
  File "/Users/organic/Development/Python/starcraft/pythonstarcrafttutorial.py", line 1, in <module>
    import sc2
ModuleNotFoundError: No module named 'sc2'

@ttinies
Copy link

ttinies commented Sep 6, 2018

Sounds like the OP issue is now resolved by using Anaconda.

@organicnz,

The issue likely stems from your install command:
pip3 install --user --upgrade sc2

When you install this way (outside a virtual environment), you are installing into a local user space (often ~/.local/lib/python3.6/site-packages/). You will need to verify whether your system path $PATH includes this user path.

@Fresh508
Copy link

Can you explain this a little more. I don't understand. where should it be installed? mine is installed In a folder I can only find by terminal search is this bad?

@quangdung
Copy link

Try to install with
pip3 install --user --upgrade sc2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants