Soru & Cevap

Jupyterlab ile çalışırken kütüphaneleri import edemiyorum. Ş ...

26.12.2022 - 10:59

Jupyterlab ile çalışırken kütüphaneleri import edemiyorum.Yardımcı olabilir misiniz ?

102 Görüntülenme

8 Cevap

Sitedeki sorulara cevap verebilmek için giriş yapın ya da üye olun.

Profile picture for user muruvveteravci
muruvveteravci
12.02.2023 - 09:57

notebook sayfasında böceğin yanında python 3 (ipykernel) seçili olması gerekiyor. no kernel olunca import edilemiyor, belki bu yüzden olabilir

Profile picture for user eessaatt666
eessaatt666
26.01.2023 - 07:08

ORTAM DEĞİŞKENLERİNDE PATH DE ANACONDAYI KONTROL EDİN

Profile picture for user sevgii
sevgii
30.12.2022 - 12:29

Sorun çözüldü mü acaba?

irem nur uzun
30.12.2022 - 10:37

Hayır çözemedim. Kütüphaneleri zaten import ediyorum pandas numpy vb gibi kütüphaneler çalışıyor. Fakat seaborn kütüphanesini import edip dataset yüklemek istediğimde urlerror diye bir hata alıyorum.

titanic = sns.load_dataset("titanic")

 

URLError                                  Traceback (most recent call last)
Cell In[10], line 1
----> 1 titanic = sns.load_dataset("titanic")

File /lib/python3.10/site-packages/seaborn/utils.py:582, in load_dataset(name, cache, data_home, **kws)
    580 cache_path = os.path.join(get_data_home(data_home), os.path.basename(url))
    581 if not os.path.exists(cache_path):
--> 582     if name not in get_dataset_names():
    583         raise ValueError(f"'{name}' is not one of the example datasets.")
    584     urlretrieve(url, cache_path)

File /lib/python3.10/site-packages/seaborn/utils.py:508, in get_dataset_names()
    502 """Report available example datasets, useful for reporting issues.
    503 
    504 Requires an internet connection.
    505 
    506 """
    507 url = "https://github.com/mwaskom/seaborn-data"
--> 508 with urlopen(url) as resp:
    509     html = resp.read()
    511 pat = r"/mwaskom/seaborn-data/blob/master/(\w*).csv"

File /lib/python3.10/urllib/request.py:216, in urlopen(url, data, timeout, cafile, capath, cadefault, context)
    214 else:
    215     opener = _opener
--> 216 return opener.open(url, data, timeout)

File /lib/python3.10/urllib/request.py:519, in OpenerDirector.open(self, fullurl, data, timeout)
    516     req = meth(req)
    518 sys.audit('urllib.Request', req.full_url, req.data, req.headers, req.get_method())
--> 519 response = self._open(req, data)
    521 # post-process response
    522 meth_name = protocol+"_response"

File /lib/python3.10/urllib/request.py:541, in OpenerDirector._open(self, req, data)
    538 if result:
    539     return result
--> 541 return self._call_chain(self.handle_open, 'unknown',
    542                         'unknown_open', req)

File /lib/python3.10/urllib/request.py:496, in OpenerDirector._call_chain(self, chain, kind, meth_name, *args)
    494 for handler in handlers:
    495     func = getattr(handler, meth_name)
--> 496     result = func(*args)
    497     if result is not None:
    498         return result

File /lib/python3.10/urllib/request.py:1419, in UnknownHandler.unknown_open(self, req)
   1417 def unknown_open(self, req):
   1418     type = req.type
-> 1419     raise URLError('unknown url type: %s' % type)

URLError: <urlopen error unknown url type: https>
Profile picture for user sevgii
sevgii
29.12.2022 - 08:05

Sorununuz çözüldü mü?

Profile picture for user nursenabozdag
nursenabozdag
29.12.2022 - 02:03

İrem hanım jupyter de boş bir hücreye pip install pandas yazarsanız kütüphaneyi yüklemiş olursunuz. Bu işlemi diğer kütüphaneler içinde yaptığınızda sorun kalmayacaktır.

 

irem nur uzun
29.12.2022 - 04:08

nursena hanım ilginiz için teşekkürler öncelikle,

kütüphaneleri import ettim onda sıkıntı kalmadı fakat seaborn kütüphanesinde çalışırken dataset yüklemek istediğimde  url error diye bir hata alıyorum. hata baya uzun hepsini gösteremedim. Bunu çözemiyorum. 

 

URLError                                  Traceback (most recent call last)
Cell In[10], line 1
----> 1 titanic = sns.load_dataset("titanic")

File /lib/python3.10/site-packages/seaborn/utils.py:582, in load_dataset(name, cache, data_home, **kws)
    580 cache_path = os.path.join(get_data_home(data_home), os.path.basename(url))
    581 if not os.path.exists(cache_path):
--> 582     if name not in get_dataset_names():
    583         raise ValueError(f"'{name}' is not one of the example datasets.")
    584     urlretrieve(url, cache_path)
Nur Sena Bozdağ
01.01.2023 - 10:31

İrem hanım araştırdım sanırım sizi hata jupyter lab ile alakalı isterseniz baştan kurun. En iyi çözüm böyle olacaktır.

Profile picture for user nursenabozdag
nursenabozdag
27.12.2022 - 10:24

Kütüphaneleri indirmeniz gerekmektedir. Bunu da terminalden veya jupyter lab üzerinden yapabilirsiniz.

Profile picture for user f.erenyucal
f.erenyucal
26.12.2022 - 04:46

Merhabalar İrem Nur Hanım, Jupyterlab üzerinde bir kod dosyası açtığınızda, dosyada yazdığınız kodu çalıştırmak için bir hücre oluşturmanız gerekiyor. Bu hücreleri oluşturmak için, menü çubuğundaki "Insert" seçeneğine tıklayıp "Insert Cell Above" veya "Insert Cell Below" seçeneklerinden birini seçebilirsiniz. Sonrasında İmport versiyonlarınız sorunsuz çalışması gerekmektedir

 

Teşekkür Ederim

irem nur uzun
29.12.2022 - 09:05

import pandas as pd
import seaborn as sns
 

titanic = sns.load_dataset("titanic")

 

 

 Traceback (most recent call last)
Cell In[8], line 1
----> 1 titanic = sns.load_dataset("titanic")

File /lib/python3.10/site-packages/seaborn/utils.py:582, in load_dataset(name, cache, data_home, **kws)
    580 cache_path = os.path.join(get_data_home(data_home), os.path.basename(url))
    581 if not os.path.exists(cache_path):
--> 582     if name not in get_dataset_names():
    583         raise ValueError(f"'{name}' is not one of the example datasets.")
    584     urlretrieve(url, cache_path)

File /lib/python3.10/site-packages/seaborn/utils.py:508, in get_dataset_names()
    502 """Report available example datasets, useful for reporting issues.

 

 

bu şekilde devam eden bir hata alıyorum.vscode üzerinde olmuyor bu hata

Profile picture for user nursenabozdag
nursenabozdag
26.12.2022 - 03:11

eğer import edemiyorsanız kütüphane yüklü olmadığı için olabilir. Cmd de veya notebookta pip install diyerek kütüphaneleri yükleyebilirsiniz.