python-sc2
python-sc2 copied to clipboard
I have this issue? import sc2 ImportError: No module named 'sc2'
We need more info. Can you tell us your installation process? How did you install the python-sc2
library?
I install python 3.6 with Anaconda and i was using PowerShell. Now i use the Anaconda prompt and everything is going well.
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'
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.
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?
Try to install with
pip3 install --user --upgrade sc2