First I installed the coinmarketcap from the pycharm project interpreter.
Then I run the code below:
>>> from coinmarketcap import Market
>>> coinmarketcap = Market()
>>> coinmarketcap.ticker(<currency>, limit=3, convert='EUR')
But I got this:
ImportError: cannot import name Market
Then I thought it is not the right library, so I installed the following API from https://github.com/mrsmn/coinmarketcap-api thinking that pycharm might have installed some other library.
So I downloaded the library from Github and I used the python setup.py install command and installed the library from Github without any problems.
I tried to rerun the code, but the problem still persists:
ImportError: cannot import name Market
I have finally solved it. Actually I needed to uninstall it within pycharm. Then I installed it using the pip install coinmarketcap and after that it works.
Thank you for your help!
I have installed it using pip and tried to import it and did not get any error.so, can you check whether the installation is done with out any error
Related
I installed spotipy on my laptop using pip install spotify
at cmd. I checked that spotipy was successfully installed using pip install check.
pip install spotify error message
result of pip list
However, when I try to use spotify on kaggle, I get an error message that says there is no module named spotify.
I had similar issues with jupyter notebook. What should I do to fix this?
When you install a package using pip, you get to use it through Python. Spotipy isn't a CLI tool, and cannot be accessed by simply typing it on cmd. If you were to open up a Python terminal and try import spotipy, it would import properly.
Consider the block of code on the official Spotipy doc. It imports Spotipy, then uses it within the code itself:
import spotipy
...
spotify = spotipy.Spotify(client_credentials_manager=SpotifyClientCredentials())
results = spotify.artist_albums(birdy_uri, album_type='album')
Also consider reading up on Python packages and how they work.
I installed GraphQl on Windows 10 Laptop using the below command:
pip install --pre gql[all]
I tried using the Basic example available on Official Github Page. in my Python IDLE.
However, I am getting this ImportError in my IDLE.
ImportError: cannot import name 'gql' from 'gql'
Kindly help in resolving the issue.
Thanks
make sure the name of your file you're testing with isn't named something similar to a package you're importing. Just got me when I named my file ariadne.py
https://github.com/mirumee/ariadne/issues/400#issue-662473441
I have recently installed python 2.17.14 to use a package which I installed in the command prompt with:
python -m pip install packageName
However, whenever I try to use it with a script provided by the package authors, I get Import Errors:
ImportError: cannot import X from YX
ImportError: attempted relative import with no known parent package.
I don't know what I'm doing wrong, as I am really new to Python. Does anyone have any ideas?
The package is called neurodesign and I downloaded the try out script from the official website "neuropowertools.org"
Best,
Max
In case anyone (who is also new to python^^) fails ridiculously at this task as well: I had to manually install all the modules used within this package for it to work as they weren't installed automatically.
So I am not able to import BeautifulSoup after I have installed bs4.
I have tried installing bs4 using pip, pip3, and pip3.6. All successfully install bs4, but I still get the error saying there is no module named bs4 when I try and import it.
I have also tried doing it by using "pip install beautifulsoup4" with no luck.
I am using python 3.6.5 on Windows 10.
This is the output of my pip commands
Let me know things I can try differently to get this working.
Thanks for any help.
Had two installs of Python. Man I feel like an idiot haha. The second install was hidden in a visual studio folder.
I had a similar issue - but switched my interpreter (in pycharm) from the 'local' to the global python scripts.
Successful running of script on local html files and on requests.
Thank you to this thread and one other for helping me fix the issue.
I am trying to download the Pygraphics module using Python 2.7.6 and have been heretofore unsuccessful. Below I detail the steps I have taken so far. Any help with this would be most appreciated.
First, I tried the typical install using pip
sudo pip install Pygraphics
When I try to import the module, I receive an error saying ImportError: No module named Pygraphics.
To test whether the module was installed I ran the following code: print sorted(["%s==%s" % (i.key, i.version) for i in pip.get_installed_distributions()]) which showed me all of my installed distributions.
This code returned the following list of all the distributions and clearly showed that Pygraphics is installed:
['altgraph==0.10.2', 'bdist-mpkg==0.5.0', 'bonjour-py==0.3', 'brewer2mpl==1.4', 'certifi==14.05.14', 'datetime==4.0.1', 'flask==0.10.1', 'ggplot==0.6.5', 'ipython==2.0.0-dev', 'itsdangerous==0.24', 'jdcal==1.0', 'jinja2==2.7.3', 'macholib==1.5.1', 'markupsafe==0.23', 'matplotlib==1.4.x', 'mock==1.0.1', 'modulegraph==0.10.4', 'nose==1.3.4', 'numpy==1.9.0.dev-297f54b', 'openpyxl==2.1.2', 'pandas==0.14.1', 'pandasql==0.6.1', 'patsy==0.3.0', 'pika==0.9.14', 'py2app==0.7.3', 'pygments==1.6', 'pygraphics==2.1']
After this, I tried using the GUI installer located on the following Pygrahpics install website. While going through the installer, I received an error message saying "PyGraphics requires System Python 2.7 to install" despite the fact that I have downloaded Python 2.7.6.
At this point I don't know what to do and was hoping someone who may have had a similar issue might be able to help me out.
Thank you for your time.
It looks like you've successfully install PyGraphics. Now import picture :)